return result;
}
// Next, node-set/t for t in {real, string, node-set, result-tree}
NodeIterator iter = ((NodeIterator)left).reset();
if (right instanceof NodeIterator) {
result = compare(iter, (NodeIterator)right, op, dom);
}
else if (right instanceof String) {
result = compare(iter, (String)right, op, dom);
}
else if (right instanceof Number) {
final double temp = ((Number)right).doubleValue();
result = compare(iter, temp, op, dom);
}
else if (right instanceof Boolean) {
boolean temp = ((Boolean)right).booleanValue();
result = (iter.reset().next() != NodeIterator.END) == temp;
}
else if (right instanceof DOM) {
result = compare(iter, ((DOM)right).getStringValue(),
op, dom);
}