Comparing Single Values With <=, <, >, and >=

When neither object to be compared is a node set and the operator is <=, <, >=, or >, the XPath processor performs the comparison by converting both objects to numbers and comparing the numbers according to IEEE 754.

Comparison
True If and Only If
<
The first number is less than the second number.
<=
The first number is less than or equal to the second number.
>
The first number is greater than the second number.
>=
The first number is greater than or equal to the second number.
Table 57. Comparison Operator Descriptions

The XPath processor always evaluates these comparisons in terms of numbers. You cannot use the less than and greater than operators to order strings. This is especially important to remember when you compare a number with a string. For example, suppose you want to evaluate the expression

a < "foo"
               

            

The return value is always false. This is because number("foo") returns NaN, and the resulting comparison, shown below, is always false.

a < NaN
               

            

XML Code Folding

Stylus Studio's XML Editor features XML code folding, a powerful and intuitive way to maximize limited screen real-estate and help make sense of large XML files.

XQuery Mapper

Stylus Studio has the industry's only XQuery mapper, enabling you to develop sophisticated XML mappings consisting of queries and data transformation in an intuitive, visual manner.

Chemical Companies That Use Stylus Studio

When working in a lab it's always important to have the right ingredients. That's why top chemical companies use Stylus Studio 2006 to create the ultimate experiments. See which of these top chemical companies are using Stylus Studio today!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member