XPath/XQuery hexBinary-less-than function

Summary

Returns true if the first argument is less than the second.

Operator Mapping

Defines the semantics of the "lt" operator when applied to two xs:hexBinary values. Also used in the definition of the "ge" operator.

Signature

op:hexBinary-less-than(
$arg1 as xs:hexBinary,
$arg2 as xs:hexBinary
) as xs:boolean

Rules

The function returns true if any of the following conditions is true:

  1. $arg1 is zero-length (contains no octets) and $arg2 is not zero-length.

  2. Neither argument is zero-length, and the first octet of $arg1 is less than the first octet of $arg2, treating the value of the octet as an unsigned integer in the range 0 to 255.

  3. Neither argument is zero-length, the first octet of $arg1 is equal to the first octet of $arg2, and the xs:hexBinary value formed by taking all octets of arg1 after the first is less than the xs:hexBinary value formed by taking all octets of arg2 after the first.

Otherwise, the function returns false.