This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: or predicates
- From: Jarno dot Elovirta at nokia dot com
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 6 Feb 2002 17:19:02 +0200
- Subject: RE: [xsl] or predicates
- Reply-to: xsl-list at lists dot mulberrytech dot com
> -----Original Message-----
> From: ext bernwardhanssen@web.de [mailto:bernwardhanssen@web.de]
> Sent: 06. February 2002 16:42
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] or predicates
>
>
> 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?
Because "|" is used in UnionExpr <http://www.w3.org/TR/xpath#NT-UnionExpr>, not in OrExpr <http://www.w3.org/TR/xpath#NT-OrExpr> - use "or", i.e.
<xsl:apply-templates select="doc[N1='xxx' or N2='yyy']"/>
Santtu
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list