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: This line of code comes from the xml documentation (page 31): \xmlfilter{#1}{./node[@type=="cleanup"]} It should select among the <node>'s those with <node type="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=="cleanup"]}} \xmlfilter{#1}{./node[@type=="cleanup"]} \crlf \stopxmlsetups \startxmlsetups demo:attribute:node calling node <\xmltag{#1}> \xmlflush{#1} \crlf \stopxmlsetups \startbuffer[attribute] <root> <node>no attribute</node> <node type="cleanup">attribute type = cleanup</node> </root> \stopbuffer \startbuffer[attribute2] <root> <node>no attribute</node> <node type="cleanup">attribute type=cleanup</node> </root> \stopbuffer \starttext \ConTeXt\ version\contextversion\blank \xmlprocessbuffer{demo}{attribute}{} \stoptext
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 ___________________________________________________________________________________