| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.expr.Assignation net.sf.saxon.expr.LetExpression
All known Subclasses: net.sf.saxon.expr.EagerLetExpression,
LetExpression | public class LetExpression extends Assignation implements TailCallReturner(Code) | | A LetExpression is modelled on the XQuery syntax let $x := expr return expr. This syntax
is not available in the surface XPath language, but it is used internally in an optimized
expression tree.
|
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. | public int | computeCardinality() | public int | computeSpecialProperties() Get the static properties of this expression (other than its type). | public void | display(int level, NamePool pool, PrintStream out) | protected ValueRepresentation | eval(XPathContext context) Evaluate the variable. | public Item | evaluateItem(XPathContext context) | public ItemType | getItemType(TypeHierarchy th) | public SequenceIterator | iterate(XPathContext context) | public boolean | markTailFunctionCalls() | public Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) Perform optimisation of an expression and its subexpressions.
This method is called after all references to functions and variables have been resolved
to the declaration of the function or variable, and after all type checking has been done.
Parameters: opt - the optimizer in use. | public void | process(XPathContext context) | public TailCall | processLeavingTail(XPathContext context) ProcessLeavingTail: called to do the real work of this instruction.
The results of the instruction are written
to the current Receiver, which can be obtained via the Controller.
Parameters: context - The dynamic context of the transformation, giving access to the current node,the current variables, etc. | public Expression | promote(PromotionOffer offer) | public Expression | typeCheck(StaticContext env, ItemType contextItemType) |
LetExpression | public LetExpression()(Code) | | |
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.
|
computeCardinality | public int computeCardinality()(Code) | | Determine the static cardinality of the expression
|
computeSpecialProperties | public int computeSpecialProperties()(Code) | | Get the static properties of this expression (other than its type). The result is
bit-signficant. These properties are used for optimizations. In general, if
property bit is set, it is true, but if it is unset, the value is unknown.
|
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Determine the data type of the items returned by the expression, if possible
one of the values Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE,or Type.ITEM (meaning not known in advance) Parameters: th - |
markTailFunctionCalls | public boolean markTailFunctionCalls()(Code) | | Mark tail function calls
|
optimize | public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType) throws XPathException(Code) | | Perform optimisation of an expression and its subexpressions.
This method is called after all references to functions and variables have been resolved
to the declaration of the function or variable, and after all type checking has been done.
Parameters: opt - the optimizer in use. This provides access to supporting functions; it also allowsdifferent optimization strategies to be used in different circumstances. Parameters: env - the static context of the expression Parameters: contextItemType - the static type of "." at the point where this expression is invoked.The parameter is set to null if it is known statically that the context item will be undefined.If the type of the context item is not known statically, the argument is set tonet.sf.saxon.type.Type.ITEM_TYPE the original expression, rewritten if appropriate to optimize execution throws: net.sf.saxon.trans.StaticError - if an error is discovered during this phase(typically a type error) |
process | public void process(XPathContext context) throws XPathException(Code) | | Process this expression as an instruction, writing results to the current
outputter
|
processLeavingTail | public TailCall processLeavingTail(XPathContext context) throws XPathException(Code) | | ProcessLeavingTail: called to do the real work of this instruction.
The results of the instruction are written
to the current Receiver, which can be obtained via the Controller.
Parameters: context - The dynamic context of the transformation, giving access to the current node,the current variables, etc. null if the instruction has completed execution; or a TailCall indicatinga function call or template call that is delegated to the caller, to be made after the stack hasbeen unwound so as to save stack space. |
|
|