| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.instruct.Instruction net.sf.saxon.instruct.Block
Block | public class Block extends Instruction (Code) | | Implements an imaginary xsl:block instruction which simply evaluates
its contents. Used for top-level templates, xsl:otherwise, etc.
|
Constructor Summary | |
public | Block() |
Method Summary | |
public 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. | final public boolean | createsNewNodes() Determine whether this instruction creates new nodes. | public void | display(int level, NamePool pool, PrintStream out) Diagnostic print of expression structure. | public static void | displayChildren(Expression[] children, int level, NamePool pool, PrintStream out) | final public int | getCardinality() | public Expression[] | getChildren() Get the children of this instruction
the children of this instruction, as an array of Instruction objects. | public int | getImplementationMethod() An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
This method indicates which of these methods is provided. | final public ItemType | getItemType(TypeHierarchy th) | public SequenceIterator | iterate(XPathContext context) | public Iterator | iterateSubExpressions() | public static Expression | makeBlock(Expression e1, Expression e2) | public Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) | public TailCall | processLeavingTail(XPathContext context) | protected void | promoteInst(PromotionOffer offer) Handle promotion offers, that is, non-local tree rewrites. | public void | setChildren(Expression[] children) | public Expression | simplify(StaticContext env) Simplify an expression. | public Expression | typeCheck(StaticContext env, ItemType contextItemType) |
checkPermittedContents | public void checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole) throws XPathException(Code) | | Check that any elements and attributes constructed or returned by this expression are acceptable
in the content model of a given complex type. It's always OK to say yes, since the check will be
repeated at run-time. The process of checking element and attribute constructors against the content
model of a complex type also registers the type of content expected of those constructors, so the
static validation can continue recursively.
|
createsNewNodes | final public boolean createsNewNodes()(Code) | | Determine whether this instruction creates new nodes.
This implementation returns true if any child instruction
returns true.
|
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Diagnostic print of expression structure. The expression is written to the System.err
output stream
Parameters: level - indentation level for this expression Parameters: out - |
displayChildren | public static void displayChildren(Expression[] children, int level, NamePool pool, PrintStream out)(Code) | | Display the children of an instruction for diagostics
|
getCardinality | final public int getCardinality()(Code) | | Determine the cardinality of the expression
|
getChildren | public Expression[] getChildren()(Code) | | Get the children of this instruction
the children of this instruction, as an array of Instruction objects. May return eithera zero-length array or null if there are no children |
getImplementationMethod | public int getImplementationMethod()(Code) | | An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
This method indicates which of these methods is provided. This implementation provides both iterate() and
process() methods natively.
|
getItemType | final public ItemType getItemType(TypeHierarchy th)(Code) | | Determine the data type of the items returned by this expression
the data type Parameters: th - |
setChildren | public void setChildren(Expression[] children)(Code) | | Set the children of this instruction
Parameters: children - The instructions that are children of this instruction |
simplify | public Expression simplify(StaticContext env) throws XPathException(Code) | | Simplify an expression. This performs any static optimization (by rewriting the expression
as a different expression). The default implementation does nothing.
exception: XPathException - if an error is discovered during expressionrewriting the simplified expression |
|
|