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: XPath question


> I tried the following  query and got results even the actual 
> number of count is 1. It seems that if either side of the 
> expression is true, the whole expression is true. 
> /someelement[2 < count(somechildelement) < 5]
> 

The expression
   a < b < c
means
   (a < b) < c
which means
   number(a < b) < number(c)

So the result of the comparison a<b is converted to a number (0 or 1)
and this is compared with c. Note very useful, but that's the way it
works.

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


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