// If either operand is a string, or if both are untyped atomic, convert
// both operands to strings and compare them
if (t0.equals(BuiltInAtomicType.STRING) || t1.equals(BuiltInAtomicType.STRING) ||
(t0.equals(BuiltInAtomicType.UNTYPED_ATOMIC) && t1.equals(BuiltInAtomicType.UNTYPED_ATOMIC))) {
StringValue s0 = (StringValue)a0.convert(BuiltInAtomicType.STRING, true, context).asAtomic();
StringValue s1 = (StringValue)a1.convert(BuiltInAtomicType.STRING, true, context).asAtomic();
return ValueComparison.compare(s0, operator, s1, comparer);
}
// If either operand is untyped atomic,
// convert it to the type of the other operand, and compare