net.sf.saxon.instruct
public class Block extends Instruction
Constructor Summary | |
---|---|
Block()
Create an empty block |
Method Summary | |
---|---|
void | checkForUpdatingSubexpressions()
Check to ensure that this expression does not contain any updating subexpressions.
|
void | checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole)
Check that any elements and attributes constructed or returned by this expression are acceptable
in the content model of a given complex type. |
int | computeSpecialProperties() |
boolean | containsLocalParam()
Test whether the Block includes a LocalParam instruction (which will be true only if it is the
body of an XSLT template) |
Expression | copy()
Copy an expression. |
boolean | createsNewNodes()
Determine whether this instruction creates new nodes.
|
void | evaluatePendingUpdates(XPathContext context, PendingUpdateList pul)
Evaluate an updating expression, adding the results to a Pending Update List.
|
void | explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
int | getCardinality()
Determine the cardinality of the expression |
Expression[] | getChildren()
Get the children of this instruction |
int | getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the items returned by this expression |
boolean | isUpdatingExpression()
Determine whether this is an updating expression as defined in the XQuery update specification
|
boolean | isVacuousExpression()
Determine whether this is a vacuous expression as defined in the XQuery update specification |
SequenceIterator | iterate(XPathContext context)
Iterate over the results of all the child expressions |
EventIterator | iterateEvents(XPathContext context)
Get an EventIterator over the results of all the child expressions |
Iterator<Expression> | iterateSubExpressions() |
static Expression | makeBlock(Expression e1, Expression e2)
Static factory method to create a block. |
static Expression | makeBlock(List<Expression> list)
Static factory method to create a block from a list of expressions |
Expression | mergeAdjacentTextInstructions()
Merge any adjacent instructions that create literal text nodes |
Expression | optimize(ExpressionVisitor visitor, ItemType contextItemType) |
TailCall | processLeavingTail(XPathContext context) |
void | processLocalParams(XPathContext context)
Process any local parameter declarations within the block. |
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 |
void | setChildren(Expression[] children)
Set the children of this instruction |
Expression | simplify(ExpressionVisitor visitor)
Simplify an expression. |
Expression | typeCheck(ExpressionVisitor visitor, ItemType contextItemType) |
Throws: net.sf.saxon.trans.XPathException if the expression has a non-permitted updateing subexpression
Returns: true if the Block contains a LocalParam instruction
Returns: the copy of the original expression
Parameters: context the XPath dynamic evaluation context pul the pending update list to which the results should be written
Returns: the children of this instruction, as an array of Instruction objects. May return either a zero-length array or null if there are no children
Parameters: th the type hierarchy cache
Returns: the data type
Returns: true if this is an updating expression
Returns: true if this expression is vacuous
Parameters: context the XPath dynamic context
Returns: an EventIterator
Parameters: e1 the first subexpression (child) of the block e2 the second subexpression (child) of the block
Returns: a Block containing the two subexpressions, and if either of them is a block, it will have been collapsed to create a flattened sequence
Parameters: list the list of expressions making up this block. The members of the List must be instances of Expression
Returns: a Block containing the two subexpressions, and if either of them is a block, it will have been collapsed to create a flattened sequence
Returns: the expression after merging literal text instructions
Parameters: context dynamic evaluation context
Throws: XPathException
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: children The instructions that are children of this instruction
Parameters: visitor an expression visitor
Returns: the simplified expression
Throws: XPathException if an error is discovered during expression rewriting