net.sf.saxon.instruct
public class While extends Instruction
Constructor Summary | |
---|---|
While(Expression test, Expression action) |
Method Summary | |
---|---|
Expression | copy()
Copy an expression. |
boolean | createsNewNodes()
Determine whether this instruction creates new nodes.
|
void | explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
Expression | getActionExpression()
Get the action expression (the content of the for-each) |
int | getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes |
ItemType | getItemType(TypeHierarchy th)
Get the item type of the items returned by evaluating this instruction
|
boolean | hasLoopingSubexpression(Expression child)
Given an expression that is an immediate child of this expression, test whether
the evaluation of the parent expression causes the child expression to be
evaluated repeatedly |
Iterator<Expression> | iterateSubExpressions()
Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction) |
Expression | optimize(ExpressionVisitor visitor, ItemType contextItemType) |
TailCall | processLeavingTail(XPathContext context) |
protected void | promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites. |
boolean | replaceSubExpression(Expression original, Expression replacement)
Replace one subexpression by a replacement subexpression |
Expression | simplify(ExpressionVisitor visitor)
Simplify an expression. |
Expression | typeCheck(ExpressionVisitor visitor, ItemType contextItemType) |
Returns: the copy of the original expression
Returns: the string "saxon:while"
Parameters: th the type hierarchy cache
Returns: the static item type of the instruction
Parameters: child the immediate subexpression
Returns: true if the child expression is evaluated repeatedly
Parameters: offer The type of rewrite being offered
Throws: XPathException
Parameters: original the original subexpression replacement the replacement subexpression
Returns: true if the original subexpression is found
Parameters: visitor an expression visitor
Returns: the simplified expression
Throws: XPathException if an error is discovered during expression rewriting