private void mustBeOrdered(PlainType t1, BuiltInAtomicType p1) throws XPathException { if (!p1.isOrdered(true)) { XPathException err = new XPathException("Type " + t1.toString() + " is not an ordered type"); err.setErrorCode("XPTY0004"); err.setIsTypeError(true); err.setLocation(getLocation()); throw err; } }
private void mustBeOrdered(PlainType t1, BuiltInAtomicType p1) throws XPathException { if (!p1.isOrdered(true)) { XPathException err = new XPathException("Type " + t1.toString() + " is not an ordered type"); err.setErrorCode("XPTY0004"); err.setIsTypeError(true); err.setLocation(getLocation()); throw err; } }
@Override public Expression makeOptimizedFunctionCall(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo, Expression... arguments) throws XPathException { // test for a singleton: this often happens after (A<B) is rewritten as (min(A) lt max(B)) int card = arguments[0].getCardinality(); if (!Cardinality.allowsMany(card)) { ItemType it = arguments[0].getItemType().getPrimitiveItemType(); if (it instanceof BuiltInAtomicType && ((BuiltInAtomicType)it).isOrdered(false)) { TypeHierarchy th = visitor.getConfiguration().getTypeHierarchy(); if (th.relationship(it, BuiltInAtomicType.UNTYPED_ATOMIC) != TypeHierarchy.DISJOINT) { return UntypedSequenceConverter.makeUntypedSequenceConverter( visitor.getConfiguration(), arguments[0], BuiltInAtomicType.DOUBLE).typeCheck(visitor, contextInfo); } else { return arguments[0]; } } } return null; }
@Override public Expression makeOptimizedFunctionCall(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo, Expression... arguments) throws XPathException { // test for a singleton: this often happens after (A<B) is rewritten as (min(A) lt max(B)) int card = arguments[0].getCardinality(); if (!Cardinality.allowsMany(card)) { ItemType it = arguments[0].getItemType().getPrimitiveItemType(); if (it instanceof BuiltInAtomicType && ((BuiltInAtomicType)it).isOrdered(false)) { TypeHierarchy th = visitor.getConfiguration().getTypeHierarchy(); if (th.relationship(it, BuiltInAtomicType.UNTYPED_ATOMIC) != TypeHierarchy.DISJOINT) { return UntypedSequenceConverter.makeUntypedSequenceConverter( visitor.getConfiguration(), arguments[0], BuiltInAtomicType.DOUBLE).typeCheck(visitor, contextInfo); } else { return arguments[0]; } } } return null; }
if (!p0.isOrdered()) { XPathException err = new XPathException("Type " + t0.toString(env.getNamePool()) + " is not an ordered type"); err.setErrorCode("XPTY0004"); throw err; if (!p1.isOrdered()) { XPathException err = new XPathException("Type " + t1.toString(env.getNamePool()) + " is not an ordered type"); err.setErrorCode("XPTY0004");
if (!p0.isOrdered()) { XPathException err = new XPathException("Type " + t0.toString(env.getNamePool()) + " is not an ordered type"); err.setErrorCode("XPTY0004"); throw err; if (!p1.isOrdered()) { XPathException err = new XPathException("Type " + t1.toString(env.getNamePool()) + " is not an ordered type"); err.setErrorCode("XPTY0004");
if (!p0.isOrdered()) { XPathException err = new XPathException("Type " + t0.toString(env.getNamePool()) + " is not an ordered type"); err.setErrorCode("XPTY0004"); throw err; if (!p1.isOrdered()) { XPathException err = new XPathException("Type " + t1.toString(env.getNamePool()) + " is not an ordered type"); err.setErrorCode("XPTY0004");
if (!prim.getPrimitiveType().isOrdered(false)) { XPathException de = new XPathException("Type " + prim.getPrimitiveType() + " is not an ordered type"); de.setErrorCode("FORG0006");
if (!prim.getPrimitiveType().isOrdered()) { XPathException de = new XPathException("Type " + prim.getPrimitiveType() + " is not an ordered type"); de.setErrorCode("FORG0006");
if (!prim.getPrimitiveType().isOrdered()) { XPathException de = new XPathException("Type " + prim.getPrimitiveType() + " is not an ordered type"); de.setErrorCode("FORG0006");
if (!prim.getPrimitiveType().isOrdered()) { XPathException de = new XPathException("Type " + prim.getPrimitiveType() + " is not an ordered type"); de.setErrorCode("FORG0006");
if (!prim.getPrimitiveType().isOrdered(false)) { XPathException de = new XPathException("Type " + prim.getPrimitiveType() + " is not an ordered type"); de.setErrorCode("FORG0006");