|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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, nameCode, sequence, slotNumber, variableName |
| Fields inherited from class net.sf.saxon.expr.ComputedExpression |
locationId, staticProperties |
| Fields inherited from interface net.sf.saxon.expr.Expression |
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
| Constructor Summary | |
ForExpression()
|
|
| Method Summary | |
Expression |
analyze(StaticContext env,
ItemType contextItemType)
Type-check the expression |
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 |
void |
display(int level,
NamePool pool,
java.io.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()
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 |
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, getAction, getVariableFingerprint, getVariableName, getVariableNameCode, isGlobal, iterateSubExpressions, promote, promoteWhereClause, setSequence, setSlotNumber, setVariableDeclaration, simplify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ForExpression()
| Method Detail |
public void setPositionVariable(RangeVariableDeclaration decl)
public void setAction(Expression action)
Assignation
setAction in class Assignationaction - 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,
ItemType contextItemType)
throws XPathException
env - the static context of the expressioncontextItemType - 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
Type.ITEM_TYPE
XPathExceptionprotected Binding[] extendBindingList(Binding[] in)
extendBindingList in class Assignationpublic int getImplementationMethod()
getImplementationMethod in interface ExpressiongetImplementationMethod in class ComputedExpression
public void checkPermittedContents(SchemaType parentType,
StaticContext env,
boolean whole)
throws XPathException
checkPermittedContents in interface ExpressioncheckPermittedContents in class ComputedExpressionXPathException
public SequenceIterator iterate(XPathContext context)
throws XPathException
iterate in interface Expressioniterate in class ComputedExpressioncontext - supplies the context for evaluation
XPathException - if any dynamic error occurs evaluating the
expression
public void process(XPathContext context)
throws XPathException
process in interface Expressionprocess in class ComputedExpressioncontext - The dynamic context, giving access to the current node,
the current variables, etc.
XPathExceptionpublic ItemType getItemType()
public int computeCardinality()
computeCardinality in class ComputedExpression
public void display(int level,
NamePool pool,
java.io.PrintStream out)
level - indentation level for this expressionpool - NamePool used to expand any names appearing in the expressionout - Output destinationprotected int getConstructType()
getConstructType in class ComputedExpressionLocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||