Priority of Object Types in Comparisons

When the XPath processor performs a comparison, if either operand is a Boolean value, the XPath processor automatically converts the other operand to a Boolean value, if necessary, and makes a Boolean comparison.

If either operand is numeric and neither operand is Boolean, the XPath processor automatically converts the other operand to a numeric value, if necessary, and performs a numeric comparison.

If neither operand is numeric or Boolean, the XPath processor performs a string comparison.

 
Free Stylus Studio XML Training:
W3C Member