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

            

Learn XQuery Visually

Stylus Studio offers three infomative XQuery demonstration videos illustrating Stylus Studio's XQuery Editor, Mapper, Debugger and other advanced functionality. Watch them today!

XML Operations

Using XML Pipeline it's easy to visually specify a series of XML operations to apply on your XML data, including parsing, validating, converting and transforming, according to the needs of your business application.

Industrial & Farm Equipment

Industrial & farm equipment manufacturers are mowing away the time it takes for data integration with the power of Stylus Studio 2006! See which top industrial and farm equipment manufacturers are cowboying up with Stylus Studio.

Using the Stylus Studio XML Grid View

This free onlince video tutorial shows how to use the Stylus Studio XML Grid View.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member