Difference between revisions of "Command/xmlinclude"
< Command
Jump to navigation
Jump to search
(Create entire page) |
|||
Line 47: | Line 47: | ||
\xmlinclude... | \xmlinclude... | ||
</texcode> | </texcode> | ||
− | |||
== See also == | == See also == | ||
Line 58: | Line 57: | ||
[[Category:Command/XML|xmlinclude]] | [[Category:Command/XML|xmlinclude]] | ||
− | |||
− |
Revision as of 21:52, 16 December 2012
\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: