From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101762 Path: news.gmane.org!.POSTED!not-for-mail From: Hans van der Meer Newsgroups: gmane.comp.tex.context Subject: Re: removing and reinstating xmlsetup's Date: Thu, 30 Aug 2018 10:11:44 +0200 Message-ID: <8346B0D7-1C10-4D3C-8B91-F1DC29E04B55@ziggo.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: multipart/mixed; boundary="===============8818293197360185939==" X-Trace: blaine.gmane.org 1535616623 21535 195.159.176.226 (30 Aug 2018 08:10:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 30 Aug 2018 08:10:23 +0000 (UTC) Cc: NTG ConTeXt To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 30 10:10:18 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fvI1y-0005UT-L6 for gctc-ntg-context-518@m.gmane.org; Thu, 30 Aug 2018 10:10:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 534D85A91F; Thu, 30 Aug 2018 10:12:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zy_fdxq5NUhs; Thu, 30 Aug 2018 10:12:05 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9C7C35A953; Thu, 30 Aug 2018 10:12:05 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 869F35A953 for ; Thu, 30 Aug 2018 10:12:04 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2oHfRkD7WP2I for ; Thu, 30 Aug 2018 10:12:04 +0200 (CEST) Original-Received: from smtpq4.tb.mail.iss.as9143.net (smtpq4.tb.mail.iss.as9143.net [212.54.42.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 091715A91F for ; Thu, 30 Aug 2018 10:11:54 +0200 (CEST) Original-Received: from [212.54.42.132] (helo=smtp8.tb.mail.iss.as9143.net) by smtpq4.tb.mail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1fvI3V-00006m-RU; Thu, 30 Aug 2018 10:11:53 +0200 Original-Received: from 546a86c8.cm-12-3c.dynamic.ziggo.nl ([84.106.134.200] helo=[192.168.178.10]) by smtp8.tb.mail.iss.as9143.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1fvI3V-00062J-P8; Thu, 30 Aug 2018 10:11:53 +0200 In-Reply-To: X-Mailer: Apple Mail (2.3445.9.1) X-SourceIP: 84.106.134.200 X-Authenticated-Sender: havdmeer@ziggo.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.3 cv=fLmNIqSe c=1 sm=1 tr=0 a=wCstmS+ZHA3zSJXjQC+ubA==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=dapMudl6Dx4A:10 a=k0cNUYHhf4eKLT9VC78A:9 a=QEXdDO2ut3YA:10 a=yrm41VnLr9Xy2e2SEooA:9 a=KKGbE-nwxik7zICJ:21 a=_W_S_7VecoQA:10 none X-Ziggo-Spam-Status: No X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:101762 Archived-At: --===============8818293197360185939== Content-Type: multipart/alternative; boundary="Apple-Mail=_6E3AFFC1-A37A-4E42-AFDF-C793D97DBF38" --Apple-Mail=_6E3AFFC1-A37A-4E42-AFDF-C793D97DBF38 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 30 Aug 2018, at 00:53, Hans Hagen wrote: >=20 > 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) >=20 > ir you can decide for explicit filtering (\xmlfilter) >=20 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 =E2=80=A6 \fi \stopxmlsetups dr. Hans van der Meer --Apple-Mail=_6E3AFFC1-A37A-4E42-AFDF-C793D97DBF38 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
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
= =E2=80=A6
\fi
\stopxmlsetups

dr. Hans van der Meer

=

= --Apple-Mail=_6E3AFFC1-A37A-4E42-AFDF-C793D97DBF38-- --===============8818293197360185939== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============8818293197360185939==--