Compare two nodes.
A NodeComp
compares two nodes by their identity or by their
document order. The following rules hold:
Each operand must be either a single node or an empty sequence.
If either operand is an empty sequence the result is an empty sequence.
A comparison using the is
operator yields
true
if the two operand nodes have the same identity, otherwise
false
is returned.
A comparison using the <<
operator yields
true
if the left operand node precedes the right operand node in
document order, otherwise false
is returned.
A comparison using the >>
operator yields
true
if the left operand node follows the right operand node in
document order, otherwise false
is returned.
The result of this comparison is false
, because each node
has its own identity (rule 3):
<a>42</a> is </a>
The following construct(s) refer to this construct: