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


> 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?
>

Because the "|" operator forms the union of two node-sets, and the result of
N1='xxx' is a boolean, not a node-set.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com


 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]