Skip to content

xmllint feature parity

carols10cents edited this page Dec 21, 2014 · 1 revision

xmllint features

These are all the things that xmllint currently supports and whether they are supported, planned for development, or not planned to be supported in sxd-document.

Supported

  • Default functionality: Parse the XML files and output the result of the parsing
  • --noenc : ignore any encoding specified inside the document (Supported; always on because all encodings besides UTF-8 are ignored)
  • --nonet : refuse to fetch DTDs or entities over network (Supported; always on because network fetch is not supported)
  • (In sxd-xpath --xpath expr: evaluate the XPath expression, imply --noout

Planned

  • --output file or -o file: save to a given file
  • --format : reformat/reindent the input

Wouldn't mind having but not high priority

  • --html : use the HTML parser
  • --shell : run a navigating shell
  • --recover : output what was parsable on broken XML documents
  • --htmlout : output results as HTML
  • --nowrap : do not put HTML doc wrapper
  • --xmlout : force to use the XML serializer when using --html
  • --nodefdtd : do not default HTML doctype
  • --pretty STYLE : pretty-print in a particular style
    • 0 Do not pretty print
    • 1 Format the XML content, as --format
    • 2 Add whitespace inside tags, preserving content

Not planned/not sure what they are

If you have a use for any of these, make a feature request, but they don't look very useful.

  • --copy : used to test the internal copy implementation
  • --debug : dump a debug tree of the in-memory document
  • --debugent : debug the entities defined in the document
  • --huge : remove any internal arbitrary parser limits
  • --noent : substitute entity references by their value
  • --noout : don't output the result tree
  • --path 'paths': provide a set of paths for resources
  • --load-trace : print trace of all external entites loaded
  • --nocompact : do not generate compact text nodes
  • --valid : validate the document in addition to std well-formed check
  • --postvalid : do a posteriori validation, i.e after parsing
  • --dtdvalid URL : do a posteriori validation against a given DTD
  • --dtdvalidfpi FPI : same but name the DTD with a Public Identifier
  • --timing : print some timings
  • --repeat : repeat 100 times, for timing or profiling
  • --insert : ad-hoc test for valid insertions
  • --compress : turn on gzip compression of output
  • --push : use the push mode of the parser
  • --pushsmall : use the push mode of the parser using tiny increments
  • --maxmem nbbytes : limits memory allocation to nbbytes bytes
  • --nowarning : do not emit warnings from parser/validator
  • --noblanks : drop (ignorable?) blanks spaces
  • --nocdata : replace cdata section with text nodes
  • --encode encoding : output in the given encoding
  • --dropdtd : remove the DOCTYPE of the input docs
  • --c14n : save in W3C canonical format v1.0 (with comments)
  • --c14n11 : save in W3C canonical format v1.1 (with comments)
  • --exc-c14n : save in W3C exclusive canonical format (with comments)
  • --nsclean : remove redundant namespace declarations
  • --testIO : test user I/O support
  • --catalogs : use SGML catalogs from $SGML_CATALOG_FILES
    •          otherwise XML Catalogs starting from
      
    •      file:///etc/xml/catalog are activated by default
      
  • --nocatalogs: deactivate all catalogs
  • --auto : generate a small doc on the fly
  • --xinclude : do XInclude processing
  • --noxincludenode : same but do not generate XInclude nodes
  • --nofixup-base-uris : do not fixup xml:base uris
  • --loaddtd : fetch external DTD
  • --dtdattr : loaddtd + populate the tree with inherited attributes
  • --stream : use the streaming interface to process very large files
  • --walker : create a reader and walk though the resulting doc
  • --pattern pattern_value : test the pattern support
  • --chkregister : verify the node registration code
  • --relaxng schema : do RelaxNG validation against the schema
  • --schema schema : do validation against the WXS schema
  • --schematron schema : do validation against a schematron
  • --sax1: use the old SAX1 interfaces for processing
  • --sax: do not build a tree but work just at the SAX level
  • --oldxml10: use XML-1.0 parsing rules before the 5th edition