> -----Original Message-----
> From: ext bernwardhanssen@xxxxxx [mailto:bernwardhanssen@xxxxxx]
> Sent: 06. February 2002 16:42
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: 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
|