[NTG-context] wildcard selection in xmlfilter

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


No, never thought of ** instead of *. Also not in my printout of the manual, but that might be fairly outdated.
Thanks.

By the way, did you see my post on \xmllastatt from yesterday?

> On 12 Sep 2018, at 13:23, Hans Hagen <j.hagen at xs4all.nl> wrote:
> 
> On 9/12/2018 1:03 PM, Hans van der Meer wrote:
>> 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?
> 
> did you try **
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

dr. Hans van der Meer


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180912/01ef1ad9/attachment.html>


More information about the ntg-context mailing list