Command/xmlinclude
Jump to navigation
Jump to search
\xmlinclude
Syntax
\xmlinclude{...}{...}{...} | |
{...} | xmldata, usually main |
{...} | pattern that matches tags that stand for 'include external file'. Default: include |
{...} | names of attribute containing URL of file to include, separated by pipes. Default: href |
Description
\xmlinclude{main}{include}{filename|href|name} merges XML trees in external files into the tree called main
. External files are merged in at every include
tag; which file to merge in is determined by looking at the filename
attribute; if that is absent the href
and name
attributes are tried in order.
Further behaviour:
- If no attribute is specified,
href
is assumed. - If the file is empty or not found, the inclusion tag is replaced with nothing.
- Inclusion is recursive: if the tree you merge in itself contains inclusion tags, they are acted on, too.
Example
<example> <chapter>text 1</chapter> <chapter>text 2</chapter> </example>
\xmlinclude...
-->
See also
Help from ConTeXt-Mailinglist/Forum
All issues with:
- xmlinclude on the mailing list (all results)
- xmlinclude on the mailing list (subject only)
- xmlinclude on stack exchange
- xmlinclude in ConTeXt's source
!--
-->