Re: [NTG-context] removing and reinstating xmlsetup's

2018-08-31 Thread Hans Hagen

On 8/30/2018 10:11 AM, Hans van der Meer wrote:


On 30 Aug 2018, at 00:53, Hans Hagen > 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 








\startxmlsetups process:topnode  (structures the output, collects all 
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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] removing and reinstating xmlsetup's

2018-08-30 Thread Hans van der Meer

> On 30 Aug 2018, at 00:53, Hans Hagen  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 








\startxmlsetups process:topnode  (structures the output, collects all 
s here)
\global\topleveltrue
\xmlall{#1}{subsubnode}
\global\toplevelfalse
\stopxmlsetups
\startxmlsetups process:subsubnode
\iftoplevel
…
\fi
\stopxmlsetups

dr. Hans van der Meer


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] removing and reinstating xmlsetup's

2018-08-29 Thread Hans Hagen

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)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] removing and reinstating xmlsetup's

2018-08-29 Thread Hans van der Meer
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?

dr. Hans van der Meer


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___