RE: [xsl] or predicates

Subject: RE: [xsl] or predicates
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 6 Feb 2002 15:17:41 -0000
> 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@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx


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


Current Thread