The following comparison operators on xs:base64Binary
and
xs:hexBinary
values are defined. Comparisons take two operands of
the same type; that is, both operands must be xs:base64Binary
or
both operands may be xs:hexBinary
. Each returns a boolean value.
A value of type xs:hexBinary
can be compared with a value of type
xs:base64Binary
by casting one value to the other type. See
19.1.6 Casting to xs:base64Binary and xs:hexBinary.
Function | Meaning |
---|---|
op:hexBinary-equal |
Returns true if two xs:hexBinary values contain the same octet
sequence. |
op:hexBinary-less-than |
Returns true if the first argument is less than the second. |
op:base64Binary-equal |
Returns true if two xs:base64Binary values contain the same octet
sequence. |
op:base64Binary-less-than |
Returns true if the first argument is less than the second. |
Returns true if two xs:hexBinary
values contain the same octet
sequence.
Defines the semantics of
the "eq" and "ne" operators when applied to two xs:hexBinary
values.
op:hexBinary-equal ( |
||
$value1 |
as xs:hexBinary , |
|
$value2 |
as xs:hexBinary |
|
) as xs:boolean |
The function returns true
if $value1
and $value2
are of the same length, measured in binary octets, and contain the same octets in the
same order. Otherwise, it returns false
.
Returns true if the first argument is less than the second.
Defines the semantics of
the "lt" operator when applied to two xs:hexBinary
values. Also used in the
definition of the "ge" operator.
op:hexBinary-less-than ( |
||
$arg1 |
as xs:hexBinary , |
|
$arg2 |
as xs:hexBinary |
|
) as xs:boolean |
The function returns true
if any of the following conditions is true:
$arg1
is zero-length (contains no octets) and $arg2
is
not zero-length.
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.
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
.
Returns true if two xs:base64Binary
values contain the same octet
sequence.
Defines the semantics
of the "eq" and "ne" operators when applied to two xs:base64Binary
values.
op:base64Binary-equal ( |
||
$value1 |
as xs:base64Binary , |
|
$value2 |
as xs:base64Binary |
|
) as xs:boolean |
The function returns true
if $value1
and $value2
are of the same length, measured in binary octets, and contain the same octets in the
same order. Otherwise, it returns false
.
Returns true if the first argument is less than the second.
Defines the semantics
of the "lt" operator when applied to two xs:base64Binary
values. Also used in
the definition of the "ge" operator.
op:base64Binary-less-than ( |
||
$arg1 |
as xs:base64Binary , |
|
$arg2 |
as xs:base64Binary |
|
) as xs:boolean |
The function returns true
if any of the following conditions is true:
$arg1
is zero-length (contains no octets) and $arg2
is
not zero-length.
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.
Neither argument is zero-length, the first octet of $arg1
is equal to
the first octet of $arg2
, and the xs:base64Binary
value
formed by taking all octets of arg1
after the first is less than the
xs:base64Binary
value formed by taking all octets of
arg2
after the first.
Otherwise, the function returns false
.