net.sf.saxon.expr
public class LetExpression extends Assignation implements TailCallReturner
Field Summary | |
---|---|
int | refCount |
Constructor Summary | |
---|---|
LetExpression() |
Method Summary | |
---|---|
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 | computeCardinality()
Determine the static cardinality of the expression |
int | computeSpecialProperties()
Get the static properties of this expression (other than its type). |
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure |
protected ValueRepresentation | eval(XPathContext context)
Evaluate the variable. |
Item | evaluateItem(XPathContext context)
Evaluate the expression as a singleton |
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the items returned by the expression, if possible |
SequenceIterator | iterate(XPathContext context)
Iterate over the sequence of values |
boolean | markTailFunctionCalls()
Mark tail function calls |
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType)
Perform optimisation of an expression and its subexpressions.
|
void | process(XPathContext context)
Process this expression as an instruction, writing results to the current
outputter |
TailCall | processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction.
|
Expression | promote(PromotionOffer offer)
Promote this expression if possible |
Expression | typeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression |
Parameters: th
Returns: one of the values Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known in advance)
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 allows different optimization strategies to be used in different circumstances. env the static context of the expression 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 to ITEM_TYPE
Returns: 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)
Parameters: context The dynamic context of the transformation, giving access to the current node, the current variables, etc.
Returns: null if the instruction has completed execution; or a TailCall indicating a function call or template call that is delegated to the caller, to be made after the stack has been unwound so as to save stack space.