This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: or predicates


Inside the predicate it has to be 'or'. '|' correctly only means UNION 
not 'or', but it can be read so.

So either

"doc[N1='xxx' or N2='yyy']"
all <doc>, which have <N1> as child with value 'xxx' or <N2> with 'yyy'

or

"doc[N1='xxx'] | doc[N2='yyy']"
all <doc>, which have <N1> with 'xxx', united with all <doc>, which have 
<N2> with 'yyy'
If a node fulfills both predicates it is only once in the nodeset too, 
because one node can not occure twice in a nodeset.

I hope it is to understand - or Jeni must help.

Regards,

Joerg

bernwardhanssen@web.de wrote:

> Hi
> 
> I try to put a | inside a predicate but it doesn't work.
> <xsl:apply-templates select="doc[N1='xxx' | N2='yyy']"/>
> 
> Putting | outside the predicate works. 
> <xsl:apply-templates select="doc[N1='xxx'] | doc[N2='yyy']"/>
> 
> Why is there a difference?
> 
> regards
> 
> Bernward


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7411
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]