The simplest comparison operators are
ge. These compare two atomic values of
the same type, for example two integers, two dates, or two strings. In the case of strings,
the default collation is used (this can be set using the configuration property
DEFAULT_COLLATION). If the operands are
not atomic values, an error is raised.
>= can compare arbitrary sequences. The result is
true if any pair of items from the two sequences has the specified relationship, for
$A = $B is true if there is an item in
$A that is equal
to some item in
$B. If an argument is a node, the effect depends on whether
the source document has been validated against a schema. In Saxon-EE, with a validated
source document, Saxon will use the typed value of the node in the comparison. Without
schema validation, the type of the node is
untypedAtomic, and the effect is
that the value is converted to the type of the other operand.
is tests whether the operands represent the same (identical)
node. For example,
title is *[@note] is true if the first
title child is the first child element that has a
attribute. If either operand is an empty sequence the result is an empty sequence (which
will usually be treated as false).
>> test whether one node
precedes or follows another in document order.