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




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]