On 8/30/2018 10:11 AM, Hans van der Meer wrote:
On 30 Aug 2018, at 00:53, Hans Hagen
mailto:j.hagen@xs4all.nl> wrote: On 8/29/2018 5:54 PM, Hans van der Meer wrote:
Doing: \xmlremovesetup{SETUP} does not seems to have an effect. Is it possible to deactivate a xml setup and reinstate at at a later point in time? normally one uses modes for that (inside the setup)
ir you can decide for explicit filtering (\xmlfilter)
I cannot imagine how to accomplish it that way, given my intentions.
Solved it with a global if (not so happy with global code, but could not think of a neater, local solution). All other solutions I tried typeset multiple copies of <subsubnode>
<topnode> <subnode> <subsubnode> </subsubnode> </subnode> </topnode>
\startxmlsetups process:topnode (structures the output, collects all <subsubnode>s here) \global\topleveltrue \xmlall{#1}{subsubnode} \global\toplevelfalse \stopxmlsetups \startxmlsetups process:subsubnode \iftoplevel … \fi \stopxmlsetups
\startxmlsetups process:topnode \globalenablemode[toplevel] \xmlall{#1}{subsubnode} \globaldisablemode[toplevel] \stopxmlsetups \startxmlsetups process:subsubnode \doifmode {toplevel} { … } \stopxmlsetups you can also filter, i.e. explcitly apply setups \startxmlsetups process:topnode \xmlfilter{#1}{subsubnode/command(xml:foo)} \stopxmlsetups if they are really topnodes you can do (watch the /): \startxmlsetups process:topnode \xmlfilter{#1}{/subsubnode/command(xml:foo)} \stopxmlsetups ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------