This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: or predicates
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 6 Feb 2002 15:17:41 -0000
- Subject: RE: [xsl] or predicates
- Reply-to: xsl-list at lists dot mulberrytech dot com
> 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