/** * Simplify this expression * @param visitor an expression * @return the simplified expression * @throws XPathException */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { if (select != null) { select = visitor.simplify(select); } return this; }
/** * Simplify an expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { operand = visitor.simplify(operand); if (requiredItemType instanceof AnyItemType) { return operand; } return this; }
/** * Simplify an expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { select = visitor.simplify(select); return this; }
/** * Simplify an expression * @return the simplified expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { operand = visitor.simplify(operand); return this; }
/** * Simplify an expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { operand = visitor.simplify(operand); if (requiredItemType instanceof AnyItemType) { return operand; } return this; }
/** * Simplify an expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { select = visitor.simplify(select); return this; }
public Expression simplify(ExpressionVisitor visitor) throws XPathException { if (select != null) { select = visitor.simplify(select); } return this; }
/** * Simplify an expression. This performs any static optimization (by rewriting the expression * as a different expression). The default implementation does nothing. * @return the simplified expression * @throws net.sf.saxon.trans.XPathException * if an error is discovered during expression rewriting * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { content = visitor.simplify(content); return this; }
/** * Simplify the expression * @return the simplified expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { operand = visitor.simplify(operand); return preEvaluate(visitor); }
public Expression simplify(ExpressionVisitor visitor) throws XPathException { for (int i=0; i<components.length; i++) { components[i] = visitor.simplify(components[i]); adoptChildExpression(components[i]); } return this; }
/** * Simplify an expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { operand = visitor.simplify(operand); if (operand instanceof Literal && ((Literal)(operand)).getValue() instanceof AtomicValue) { return operand; } return this; }
/** * Simplify an expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { operand = visitor.simplify(operand); if (operand instanceof Literal && ((Literal)(operand)).getValue() instanceof AtomicValue) { return operand; } return this; }
public Expression simplify(ExpressionVisitor visitor) throws XPathException { operand = visitor.simplify(operand); if ((operand.getSpecialProperties() & StaticProperty.ORDERED_NODESET) != 0) { // this can happen as a result of further simplification return operand; } return this; }
/** * Simplify and validate. * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { Atomizer a = new Atomizer(argument[0], visitor.getConfiguration()); ExpressionTool.copyLocationInfo(this, a); return visitor.simplify(a); }
/** * Simplify and validate. * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { Atomizer a = new Atomizer(argument[0], visitor.getConfiguration()); ExpressionTool.copyLocationInfo(this, a); return visitor.simplify(a); }
/** * Simplify an expression * @param visitor an expression visitor */ public Expression simplify(ExpressionVisitor visitor) throws XPathException { operand = visitor.simplify(operand); if (operand instanceof Literal) { return Literal.makeLiteral( new SequenceExtent(iterate(visitor.getStaticContext().makeEarlyEvaluationContext()))); } return this; }