throw new XPathException(this, ErrorCodes.FORG0006, "Cannot compare " + Type.getTypeName(min.getType()) +
" and " + Type.getTypeName(value.getType()), value);
}
//Any value of type xdt:untypedAtomic is cast to xs:double
if (value.getType() == Type.ATOMIC)
{value = value.convertTo(Type.DOUBLE);}
//Numeric tests
if (Type.subTypeOf(value.getType(), Type.NUMBER)) {
//Don't mix comparisons
if (!Type.subTypeOf(min.getType(), Type.NUMBER))
{throw new XPathException(this, ErrorCodes.FORG0006, "Cannot compare " + Type.getTypeName(min.getType()) +