|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.expr.ComputedExpression | +--net.sf.saxon.expr.Assignation | +--net.sf.saxon.expr.ForExpression
A ForExpression maps an expression over a sequence. This version works with range variables, it doesn't change the context information
Field Summary |
Fields inherited from class net.sf.saxon.expr.Assignation |
action, declaration, sequence, slotNumber, variableName |
Fields inherited from class net.sf.saxon.expr.ComputedExpression |
lineNumber, NO_ARGUMENTS, staticProperties |
Constructor Summary | |
ForExpression()
|
Method Summary | |
Expression |
analyze(StaticContext env)
Type-check the expression |
int |
computeCardinality()
Determine the static cardinality of the expression |
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure |
ItemType |
getItemType()
Determine the data type of the items returned by the expression, if possible |
SequenceIterator |
iterate(XPathContext context)
Iterate over the sequence of values |
void |
process(XPathContext context)
Process this expression as an instruction, writing results to the current outputter |
TailCall |
processLeavingTail(XPathContext context)
Process the instruction, optionally returning an uncompleted tail call to be invoked by the caller |
void |
setAction(Expression action)
Add the "return" or "satisfies" expression, and fix up all references to the range variable that occur within that expression |
void |
setPositionVariable(RangeVariableDeclaration decl)
Set the reference to the position variable (XQuery only) |
Methods inherited from class net.sf.saxon.expr.Assignation |
evaluateVariable, getRequiredType, getSubExpressions, getVariableName, promote, setSequence, setSlotNumber, setVariableDeclaration, simplify |
Methods inherited from class net.sf.saxon.expr.ComputedExpression |
computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getDependencies, getIntrinsicDependencies, getLineNumber, getSourceLocator, getSpecialProperties, markTailFunctionCalls, setLineNumber, typeError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.saxon.instruct.Locatable |
getSourceLocator |
Constructor Detail |
public ForExpression()
Method Detail |
public void setPositionVariable(RangeVariableDeclaration decl)
public void setAction(Expression action)
Assignation
setAction
in class Assignation
action
- the expression that occurs after the "return" keyword of a "for"
expression, the "satisfies" keyword of "some/every", or the ":=" operator of
a "let" expression.
This method must be called after calling setVariableDeclaration()
public Expression analyze(StaticContext env) throws XPathException
analyze
in interface Expression
env
- the static context of the expression
XPathException
public SequenceIterator iterate(XPathContext context) throws XPathException
iterate
in interface Expression
iterate
in class ComputedExpression
context
- supplies the context for evaluation
XPathException
- if any dynamic error occurs evaluating the
expressionpublic void process(XPathContext context) throws javax.xml.transform.TransformerException
process
in interface Instr
context
- The dynamic context, giving access to the current node,
the current variables, etc.
javax.xml.transform.TransformerException
public TailCall processLeavingTail(XPathContext context) throws javax.xml.transform.TransformerException
processLeavingTail
in interface Instr
context
- The dynamic context, giving access to the current node,
the current variables, etc.
javax.xml.transform.TransformerException
public ItemType getItemType()
getItemType
in interface Expression
public int computeCardinality()
computeCardinality
in class ComputedExpression
public void display(int level, NamePool pool)
display
in interface Expression
level
- indentation level for this expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |