[NTG-context] including xml files

Philipp Gesang pgesang at ix.urz.uni-heidelberg.de
Sun Mar 7 11:14:56 CET 2010


Hi again,


now that everybody should be back from DANTE2010, I'll try that one
again:
> what is the recommended way of including an xml tree from one file in
> another?  Right now I'm stuck with the following
[ ... ] snip
> 
> Personally, I'd prefer some include method like file entities (<!ENTITY
> inc SYSTEM "inc.xml">) but they don't seem to work.

My latest try was \xmlinclude but that didn't work either.  When I have
the following setups

\startxmlsetups xml:afile
    \section{Filename \xmlatt{#1}{file}}
    %\xmlinclude{test} {  }          {\xmlatt{#1}{file}}
    %\xmlinclude{test} {/*}          {\xmlatt{#1}{file}}
    %\xmlinclude{test} {/sect}       {\xmlatt{#1}{file}}
    %\xmlinclude{test} {/sect/title} {\xmlatt{#1}{file}}
    \xmlinclude{test} {sect}        {\xmlatt{#1}{file}} 
\stopxmlsetups

Where “test” is the name of the document to be processed and "sect” is
the outermost node from the included file.

This produces nothing, but try uncommenting some lines: context fails
with a lua error.  Why this?  xml-mkiv says that the second argument to
\xmlinclude should be an lpath from “file” and <sect> is the first node
in the file (I'll attach it).

Is there anybody who could provide a working example of \xmlinclude or
reveal The Right Way of Including XML to me?

Thanks for any help,


Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testenv.tex
Type: text/x-tex
Size: 1501 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20100307/758e6cd0/attachment.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inc.xml
Type: application/xml
Size: 116 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20100307/758e6cd0/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20100307/758e6cd0/attachment.pgp>


More information about the ntg-context mailing list