Sorry for the noise, but I just forget to try the obvious and correct solution:

   \xmlfilter{#1}{file[@name=="whatever" or @src=="whatever"]/command(todo)}

Must have been a temporary ‘blindness’.

Hans van der Meer



On 3 dec. 2013, at 10:14, H. van der Meer <h.vanderm...@uva.nl> wrote:

> Following an example in the chapter on Expressions and filters for 
> xml-processing one can select on an attribute ‘name’ in the node <file 
> name=“whatever”/>
> 
>    file[@name=="whatever”]/command(todo) 
> 
> However, I would like to select on a combination of alternatives, so that 
> equivalent are
>     <file name=“whatever”/> and  <file src=“whatever”/>
> 
> I tried several variations but none of them work.
>    \xmlfilter{#1}{file([@name=="whatever”] or 
> [@src=="whatever”])/command(todo)
>    \xmlfilter{#1}{file[@name=="whatever”] or [@src=="whatever”]/command(todo)
>    \xmlfilter{#1}{file[@name=="whatever”] or 
> file[@src=="whatever”]/command(todo)
>    
> \xmlfilter{#1}{(file[@name=="whatever”]|file[@src=="whatever”])/command(todo)
> 
> 
> How to? Or is this impossible?
> 
> 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 / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to