[NTG-context] wildcard selection in xmlfilter

Hans van der Meer havdmeer at ziggo.nl
Wed Sep 12 13:03:07 CEST 2018


There is a difference of behaviour in \xmlfilter between 
(1) \xmlfilter{#1}{node/command(xmlsetup)} and
(2) \xmlfilter{#1}{*/command(xmlsetup)}
(3) \xmlfilter{#1}{*/*/command(xmlsetup)}

In case (1) the lpath ‘node’ results in processing of the <wildcard> nodes in all child nodes.
In case (2) and (3) no more than the corresponding level is searched.

Thus there is a difference in behaviour between node and * as an lpath.
Very unfortunate for me, because I need to process all nodes regardless of theeir node name, but selected on the basis of an attribute: \xmlfilter{#1}{*[@attribute==“yes”]. 
The difference in behaviour makes this impossible, because a general proceudre is impossible and doing a search with * and */* and */*/* etc. always will be one level too short, I expect.

Is this intended behaviour, and if so, is there a general solution?

dr. Hans van der Meer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180912/7cc4af76/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pdf
Type: application/pdf
Size: 15694 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180912/7cc4af76/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180912/7cc4af76/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tex
Type: application/octet-stream
Size: 1208 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180912/7cc4af76/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180912/7cc4af76/attachment-0005.html>


More information about the ntg-context mailing list