From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10700 invoked from network); 30 Aug 2023 12:02:05 -0000 Received: from cgl.ntg.nl (5.39.185.202) by inbox.vuxu.org with ESMTPUTF8; 30 Aug 2023 12:02:05 -0000 Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id DE235482C5D for ; Wed, 30 Aug 2023 14:01:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7dKuZEWP88-Q for ; Wed, 30 Aug 2023 14:01:26 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 2C3EF482DB4 for ; Wed, 30 Aug 2023 14:00:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 8B61A48283F for ; Wed, 30 Aug 2023 13:59:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AfrCTJ8hs6iQ for ; Wed, 30 Aug 2023 13:59:43 +0200 (CEST) Received: from csmtpq2-prd-nl1-vfz.edge.unified.services (csmtpq2-prd-nl1-vfz.edge.unified.services [84.116.50.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id B2847482811 for ; Wed, 30 Aug 2023 13:59:43 +0200 (CEST) Received: from csmtp4-prd-nl1-vfz.nl1.unified.services ([100.107.80.18] helo=csmtp4-prd-nl1-vfz.edge.unified.services) by csmtpq2-prd-nl1-vfz.edge.unified.services with esmtp (Exim 4.93) (envelope-from ) id 1qbJrL-007PLC-A1 for ntg-context@ntg.nl; Wed, 30 Aug 2023 13:59:43 +0200 Received: from smtpclient.apple ([84.104.102.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 128/128 bits) (Client did not present a certificate) by csmtp4-prd-nl1-vfz.edge.unified.services with ESMTPSA id bJrLqhpwZJgndbJrLqmLLn; Wed, 30 Aug 2023 13:59:43 +0200 X-Env-Mailfrom: havdmeer@ziggo.nl X-Env-Rcptto: ntg-context@ntg.nl X-SourceIP: 84.104.102.59 X-CNFS-Analysis: v=2.4 cv=BoFbg6b5 c=1 sm=1 tr=0 ts=64ef2f2f cx=a_exe a=r8aFSP8g8qyxuwAfcqn69g==:117 a=r8aFSP8g8qyxuwAfcqn69g==:17 a=MiNTnEJAAAAA:8 a=YEMqx4UAAAAA:8 a=ACQCx6kCAAAA:8 a=xtERp6CFAAAA:8 a=a3nu-2BBAAAA:8 a=HLWjykAyI9_y6WkkSeUA:9 a=CjuIK1q_8ugA:10 a=y49t2wnuzr8fMbB3kJUA:9 a=JqhpgOS6YabEt_ya:21 a=_W_S_7VecoQA:10 a=LmrbSfiT3hecnSZifb5M:22 a=V0662LiR8DSfwiDagK97:22 a=Sab0UneHBzlWrQDlOuxD:22 a=ekCXXmE-vB8RPiJ3MEZb:22 X-Authenticated-Sender: havdmeer@ziggo.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ziggo.nl; s=202002corplgsmtpnl; t=1693396783; bh=lI7XA97iF8gFeccaxazsj1i/W0R/kbrV2LTHCWjp9lo=; h=From:Subject:Date:References:To:In-Reply-To; b=S/9mYHG42DeTm056E6TbxOU9IHRUTEP2BV0Wu9upUZXgIk8/Qfgz/VUqj17c75aun wNytve0JpAo2wV/r7uNXXGqW1p4dZZDqMciKcYN/YO+DTBlVtyD3a07bvmrZbNtsVC ktBM0HGaDOUu291oXMuJkEvFIUNxCU8MRQHWfgTb5JdQWne0bpoX7JHI08+L+tPs1e uFh/lKtjsdKJ/EpDkpFWRxVktfeJ2RTO2vQLoNeKkVsV5DMpuvC9tQt4ycJMKdDV0u n04g7nwBCFAY4MbmD+OoFmN/ypfga5dhwBvWgs7gLl7yjU7/zC9U7aHbkZlLOK5Ev4 uTfGB6blBVKGA== Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Date: Wed, 30 Aug 2023 13:59:32 +0200 References: <0596FD9A-5F81-4C0A-A924-9FE55621BD8E@ziggo.nl> To: NTG ConTeXt In-Reply-To: <0596FD9A-5F81-4C0A-A924-9FE55621BD8E@ziggo.nl> Message-Id: <131A5BC2-F30D-4766-83C6-85B32AFEA154@ziggo.nl> X-Mailer: Apple Mail (2.3731.700.6) X-CMAE-Envelope: MS4xfCSNPqwbiInMHRlNxIeGj8rAAWZmsiA7hbKHB4KwylKtg6tN2WWhIk8HGYr5WBcmYnMXDquk0lNHPv0aqtF7VOU3k6rOF0tGmbzpQymeyRKLrujjVu+G oTTTtB4dPDyiYSkI3jfBBFGQKp7LxLAayj3g05Yrf1SFkrQgiyXRGrfOAKNGwFu9DWEoaTjp/q19yQ== Message-ID-Hash: TUKV2Y4YCDPVMEOIMVIR7RLVDRERDVE5 X-Message-ID-Hash: TUKV2Y4YCDPVMEOIMVIR7RLVDRERDVE5 X-MailFrom: havdmeer@ziggo.nl X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: attribute selection List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Hans van der Meer via ntg-context Cc: Hans van der Meer Content-Type: multipart/mixed; boundary="===============4509521413927500496==" --===============4509521413927500496== Content-Type: multipart/alternative; boundary="Apple-Mail=_F7E6B0B2-CCC4-4E38-9914-6E54871EC3E9" --Apple-Mail=_F7E6B0B2-CCC4-4E38-9914-6E54871EC3E9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Finally I saw the problem. Calling = \xmlfilter{#1}{./node/command(demo:attribute:node)} is the right way. Sorry for the noise. dr. Hans van der Meer > On 30 Aug 2023, at 13:49, Hans van der Meer via ntg-context = wrote: >=20 > This line of code comes from the xml documentation (page 31): > \xmlfilter{#1}{./node[@type=3D=3D"cleanup"]} > It should select among the 's those with . > However, this node is not selected in the call to \xmlfilter. > Where am I wrong? >=20 > MWE follows >=20 >=20 > % failure to typeset attribute selected. > \setuppapersize[A5][A5] > \startxmlsetups demo:attribute > \xmlsetsetup{#1}{root|node}{demo:attribute:*} > \stopxmlsetups > \xmlregisterdocumentsetup{demo}{demo:attribute} > \startxmlsetups demo:attribute:root > Execute \type{\xmlall{#1}{./node}} > \crlf > \xmlall{#1}{./node} > \crlf > Execute \type{\xmlfilter{#1}{./node[@type=3D=3D"cleanup"]}} > \xmlfilter{#1}{./node[@type=3D=3D"cleanup"]} > \crlf > \stopxmlsetups > \startxmlsetups demo:attribute:node > calling node <\xmltag{#1}> > \xmlflush{#1} > \crlf > \stopxmlsetups > \startbuffer[attribute] > > no attribute > attribute type =3D cleanup > > \stopbuffer > \startbuffer[attribute2] > > no attribute > attribute type=3Dcleanup > > \stopbuffer > \starttext > \ConTeXt\ version\contextversion\blank > \xmlprocessbuffer{demo}{attribute}{} > \stoptext >=20 > >=20 >=20 > Hans van der Meer > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > maillist : ntg-context@ntg.nl / = https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > = __________________________________________________________________________= _________ --Apple-Mail=_F7E6B0B2-CCC4-4E38-9914-6E54871EC3E9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Finally I saw = the problem. = Calling \xmlfilter{#1}{./node/command(demo:attribute:node)} is the = right way.
Sorry for the noise.

dr. Hans van der = Meer
On 30 Aug 2023, at = 13:49, Hans van der Meer via ntg-context <ntg-context@ntg.nl> = wrote:

This line = of code comes from the xml documentation (page = 31):
\xmlfilter{#1}{./node[@type=3D=3D"cleanup"]}
It should select = among the <node>'s those with <node = type=3D"cleanup">.
However, this node is not selected in the call = to \xmlfilter.
Where am I wrong?

MWE follows


% = failure to typeset attribute = selected.
\setuppapersize[A5][A5]
\startxmlsetups = demo:attribute
= \xmlsetsetup{#1}{root|node}{demo:attribute:*}
\stopxmlsetups
= \xmlregisterdocumentsetup{demo}{demo:attribute}
\startxmlsetups = demo:attribute:root
Execute = \type{\xmlall{#1}{./node}}
\crlf
= \xmlall{#1}{./node}
\crlf
Execute = \type{\xmlfilter{#1}{./node[@type=3D=3D"cleanup"]}}
= \xmlfilter{#1}{./node[@type=3D=3D"cleanup"]}
= \crlf
\stopxmlsetups
\startxmlsetups = demo:attribute:node
calling node = <\xmltag{#1}>
\xmlflush{#1}
= \crlf
\stopxmlsetups
\startbuffer[attribute]
<root><= br><node>no attribute</node>
<node = type=3D"cleanup">attribute type =3D = cleanup</node>
</root>
\stopbuffer
\startbuffer[attri= bute2]
<root>
<node>no = attribute</node>
<node type=3D"cleanup">attribute = type=3Dcleanup</node>
</root>
\stopbuffer
\starttext<= br>\ConTeXt\ = version\contextversion\blank
\xmlprocessbuffer{demo}{attribute}{}
\s= toptext

<xml-tex-attribute-sele= ct.pdf>


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 / = https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : = https://www.pragma-ade.nl / http://context.aanhet.net
archive  : = https://bitbucket.org/phg/context-mirror/commits/
wiki =     : = https://contextgarden.net
_____________________________________________= ______________________________________

<= /div>= --Apple-Mail=_F7E6B0B2-CCC4-4E38-9914-6E54871EC3E9-- --===============4509521413927500496== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ --===============4509521413927500496==--