/** * Type-check the expression. This also calls preEvaluate() to evaluate the function * if all the arguments are constant; functions that do not require this behavior * can override the preEvaluate method. * * @param visitor the expression visitor * @param contextInfo information about the type of the context item */ @Override public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { checkFunctionCall(target, visitor); return super.typeCheck(visitor, contextInfo); }
/** * Type-check the expression. This also calls preEvaluate() to evaluate the function * if all the arguments are constant; functions that do not require this behavior * can override the preEvaluate method. * * @param visitor the expression visitor * @param contextInfo information about the type of the context item */ @Override public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { checkFunctionCall(target, visitor); return super.typeCheck(visitor, contextInfo); }
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { Expression e = super.typeCheck(visitor, contextInfo); if (e != this) { return e; } if (function != null) { checkFunctionCall(function, visitor); if (staticType == null || staticType == SequenceType.ANY_SEQUENCE) { // try to get a better type staticType = function.getResultType(); } } return this; }
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { Expression e = super.typeCheck(visitor, contextInfo); if (e != this) { return e; } if (function != null) { checkFunctionCall(function, visitor); if (staticType == null || staticType == SequenceType.ANY_SEQUENCE) { // try to get a better type staticType = function.getResultType(); } } return this; }
public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { Expression e = super.typeCheck(visitor, contextItemType); if (function != null) { if (e == this) { computeArgumentEvaluationModes(); } if (staticType == SequenceType.ANY_SEQUENCE) { // try to get a better type staticType = function.getResultType(visitor.getConfiguration().getTypeHierarchy()); } } return e; }
public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { Expression e = super.typeCheck(visitor, contextItemType); if (function != null) { if (e == this) { computeArgumentEvaluationModes(); } if (staticType == SequenceType.ANY_SEQUENCE) { // try to get a better type staticType = function.getResultType(visitor.getConfiguration().getTypeHierarchy()); } } return e; }
public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { Expression e = super.typeCheck(visitor, contextItemType); if (function != null) { if (e == this) { computeArgumentEvaluationModes(); } if (staticType == SequenceType.ANY_SEQUENCE) { // try to get a better type staticType = function.getResultType(visitor.getConfiguration().getTypeHierarchy()); } } return e; }
/** * Type-check the expression. */ /*@NotNull*/ public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { Expression exp = super.typeCheck(visitor, contextInfo); if (exp instanceof IntegratedFunctionCall) { Expression exp2 = ((IntegratedFunctionCall) exp).function.rewrite(visitor.getStaticContext(), getArguments()); if (exp2 == null) { return exp; } else { ExpressionTool.copyLocationInfo(this, exp2); return exp2.simplify().typeCheck(visitor, contextInfo).optimize(visitor, contextInfo); } } return exp; }
/** * Type-check the expression. */ /*@NotNull*/ public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException { Expression exp = super.typeCheck(visitor, contextInfo); if (exp instanceof IntegratedFunctionCall) { Expression exp2 = ((IntegratedFunctionCall) exp).function.rewrite(visitor.getStaticContext(), getArguments()); if (exp2 == null) { return exp; } else { ExpressionTool.copyLocationInfo(this, exp2); return exp2.simplify().typeCheck(visitor, contextInfo).optimize(visitor, contextInfo); } } return exp; }
public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException { Expression tc = super.typeCheck(visitor, contextItemType); if (tc != this) { return tc;