[NTG-context] xml input

Hans Hagen pragma at wxs.nl
Thu Apr 21 10:41:02 CEST 2016


On 4/21/2016 9:41 AM, Meer, Hans van der wrote:

 > long mail ...

your

  \xmlsetsetup{#1}{*}{-}

makex takenotes into a nothing ... (comment that line if needed to see 
effects in your code)


\enabletrackers[lxml.loading,lxml.setups]

\startbuffer[notes-xml]
<?xml version="1.0" encoding="UTF-8"?>
<takenotes>
     <foo>bar</foo>
     <include file="minimal-example.xml"/>
</takenotes>
\stopbuffer

\startxmlsetups notes:setups
     \xmlinclude{#1}{include}{file}
     \xmlsetsetup{#1}{*}{-}
     \xmlsetsetup{#1}{notes|foo|takenotes}{notes:*}
\stopxmlsetups

\xmlregistersetup{notes:setups}

\startxmlsetups notes:notes
     \xmlshow{#1}
     ===> number of <note> = \xmlcount{#1}{note}
\stopxmlsetups

\startxmlsetups notes:foo
     DONE: \xmlflush{#1}
\stopxmlsetups

\startxmlsetups notes:takenotes
     \xmlflush{#1}
\stopxmlsetups

\starttext
     test
     \xmlprocessbuffer{notes}{notes-xml}{}
\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list