| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.expr.Assignation net.sf.saxon.expr.ForExpression
ForExpression | public class ForExpression extends Assignation (Code) | | A ForExpression maps an expression over a sequence.
This version works with range variables, it doesn't change the context information
|
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 Expression | convertWhereToPredicate(Optimizer opt, StaticContext env, ItemType contextItemType) Convert where clause, if possible, to a predicate. | public void | display(int level, NamePool pool, PrintStream out) | protected Binding[] | extendBindingList(Binding[] in) | protected int | getConstructType() | 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. | public ItemType | getItemType(TypeHierarchy th) | public int | getPositionVariableNameCode() | public int | getRequiredSlots() Get the number of slots required. | public SequenceIterator | iterate(XPathContext context) | public boolean | markTailFunctionCalls() Mark tail function calls: only possible if the for expression iterates zero or one times. | public Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) | public void | process(XPathContext context) | public void | setAction(Expression action) | public void | setPositionVariable(RangeVariableDeclaration decl) | public void | setSlotNumber(int nr) | public Expression | typeCheck(StaticContext env, ItemType contextItemType) |
ForExpression | public ForExpression()(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
|
extendBindingList | protected Binding[] extendBindingList(Binding[] in)(Code) | | Extend an array of variable bindings to include the binding(s) defined in this expression
|
getConstructType | protected int getConstructType()(Code) | | Get the type of this expression for use in tracing and diagnostics
the type of expression, as enumerated in class net.sf.saxon.trace.Location |
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 | 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 - |
getPositionVariableNameCode | public int getPositionVariableNameCode()(Code) | | |
getRequiredSlots | public int getRequiredSlots()(Code) | | Get the number of slots required. Normally 1, except for a FOR expression with an AT clause, where it is 2.
|
markTailFunctionCalls | public boolean markTailFunctionCalls()(Code) | | Mark tail function calls: only possible if the for expression iterates zero or one times.
(This arises in XSLT/XPath, which does not have a LET expression, so FOR gets used instead)
|
process | public void process(XPathContext context) throws XPathException(Code) | | Process this expression as an instruction, writing results to the current
outputter
|
setSlotNumber | public void setSlotNumber(int nr)(Code) | | Set the slot number for the range variable
|
|
|