* removing and reinstating xmlsetup's
@ 2018-08-29 15:54 Hans van der Meer
2018-08-29 22:53 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Hans van der Meer @ 2018-08-29 15:54 UTC (permalink / raw)
To: NTG ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 183 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 1433 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: removing and reinstating xmlsetup's
2018-08-29 15:54 removing and reinstating xmlsetup's Hans van der Meer
@ 2018-08-29 22:53 ` Hans Hagen
2018-08-30 8:11 ` Hans van der Meer
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2018-08-29 22:53 UTC (permalink / raw)
To: mailing list for ConTeXt users, Hans van der Meer
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: removing and reinstating xmlsetup's
2018-08-29 22:53 ` Hans Hagen
@ 2018-08-30 8:11 ` Hans van der Meer
2018-08-31 8:33 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Hans van der Meer @ 2018-08-30 8:11 UTC (permalink / raw)
To: Hans Hagen; +Cc: NTG ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 1028 bytes --]
> On 30 Aug 2018, at 00:53, Hans Hagen <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
dr. Hans van der Meer
[-- Attachment #1.2: Type: text/html, Size: 3699 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: removing and reinstating xmlsetup's
2018-08-30 8:11 ` Hans van der Meer
@ 2018-08-31 8:33 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2018-08-31 8:33 UTC (permalink / raw)
To: Hans van der Meer; +Cc: NTG ConTeXt
On 8/30/2018 10:11 AM, Hans van der Meer wrote:
>
>> On 30 Aug 2018, at 00:53, Hans Hagen <j.hagen@xs4all.nl
>> <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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-31 8:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 15:54 removing and reinstating xmlsetup's Hans van der Meer
2018-08-29 22:53 ` Hans Hagen
2018-08-30 8:11 ` Hans van der Meer
2018-08-31 8:33 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).