net.sf.saxon.expr
public class ForExpression extends Assignation
Constructor Summary | |
---|---|
ForExpression() |
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 |
Expression | convertWhereToPredicate(Optimizer opt, StaticContext env, ItemType contextItemType)
Convert where clause, if possible, to a predicate. |
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure |
protected Binding[] | extendBindingList(Binding[] in)
Extend an array of variable bindings to include the binding(s) defined in this expression |
protected int | getConstructType()
Get the type of this expression for use in tracing and diagnostics |
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 the expression, if possible |
int | getPositionVariableNameCode() |
int | getRequiredSlots()
Get the number of slots required. |
SequenceIterator | iterate(XPathContext context)
Iterate over the sequence of values |
boolean | markTailFunctionCalls()
Mark tail function calls: only possible if the for expression iterates zero or one times.
|
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType)
Optimize the expression |
void | process(XPathContext context)
Process this expression as an instruction, writing results to the current
outputter |
void | setAction(Expression action) |
void | setPositionVariable(RangeVariableDeclaration decl)
Set the reference to the position variable (XQuery only) |
void | setSlotNumber(int nr)
Set the slot number for the range variable |
Expression | typeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression |
Returns: the type of expression, as enumerated in class Location
Parameters: th
Returns: one of the values Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known in advance)