lxinclude — Perform XInclude processing


lxinclude [ -xmlns[:prefix]=uri ...] [ -t xinclude|knit|nite ] [ -l link-query ] [ input-file ]


lxinclude performs XInclude processing (or other similar "knitting") on an XML document. Links to elements in other documents are replaced by those elements. This allows composite documents to be created (e.g. a book can be composed from separate chapters). In NLP (Natural Language Processing) this is used to add structure to an existing documents (e.g. by having sentence elements point to word elements) and is known as "standoff annotation".

The input-file argument may be a URI instead of a filename. If no input-file argument is given, standard input is used.


binds a prefix (or the default namespace) to a URI for use in XPath queries.

-t xinclude|knit|nite

the linking syntax to use. By default, lxinclude operates according to the XInclude specification. Only shorthand and XPointer element() scheme links are supported. Two other syntaxes for standoff markup are supported: "knit" and "nite". "knit" is the syntax used by the old LT-XML knit program. "nite" is the syntax used by the NITE XML Toolkit (NXT).

-l link-query

an XPath query used to identify links. This overrides the usual link identification algorithm for the selected link syntax.


More XPointer schemes should be supported.

Same-document pointers are not supported.

Fallback processing is not supported.

xml:base and xml:lang fixup are not done.