StaticContext context,
	protected boolean compareValues(		StaticContext context,		AtomicValue lv,		AtomicValue rv)		throws XPathException {		int ltype = lv.getType();		int rtype = rv.getType();		if (ltype == Type.ITEM || ltype == Type.ATOMIC) {			if (Type.subTypeOf(rtype, Type.NUMBER)) {				lv = lv.convertTo(Type.DOUBLE);			} else if (rtype == Type.ITEM || rtype == Type.ATOMIC) {				lv = lv.convertTo(Type.STRING);				rv = rv.convertTo(Type.STRING);			} else				lv = lv.convertTo(rv.getType());		} else if (rtype == Type.ITEM || rtype == Type.ATOMIC) {			if (Type.subTypeOf(ltype, Type.NUMBER)) {				rv = rv.convertTo(Type.DOUBLE);			} else if (rtype == Type.ITEM || rtype == Type.ATOMIC) {				lv = lv.convertTo(Type.STRING);				rv = rv.convertTo(Type.STRING);			} else				rv = rv.convertTo(lv.getType());		}		if (context.isBackwardsCompatible()) {			// in XPath 1.0 compatible mode, if one of the operands is a number, cast			// both operands to xs:double			if (Type.subTypeOf(ltype, Type.NUMBER)				|| Type.subTypeOf(rtype, Type.NUMBER)) {				lv = lv.convertTo(Type.DOUBLE);				rv = rv.convertTo(Type.DOUBLE);			}		}//				System.out.println(//					lv.getStringValue() + Constants.OPS[relation] + rv.getStringValue());		return lv.compareTo(relation, rv);	}