public abstract class Assignation extends ComputedExpression implements Binding
| Modifier and Type | Field and Description |
|---|---|
protected Expression |
action |
protected RangeVariableDeclaration |
declaration |
protected int |
nameCode |
protected Expression |
sequence |
protected int |
slotNumber |
protected java.lang.String |
variableName |
locationId, staticPropertiesEVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD| Constructor and Description |
|---|
Assignation() |
| Modifier and Type | Method and Description |
|---|---|
ValueRepresentation |
evaluateVariable(XPathContext context)
Get the value of the range variable
|
protected Binding[] |
extendBindingList(Binding[] in)
Extend an array of variable bindings to include the binding(s) defined in this expression
|
Expression |
getAction()
Get the action expression
|
int |
getLocalSlotNumber()
If this is a local variable held on the local stack frame, return the corresponding slot number.
|
int |
getRequiredSlots()
Get the number of slots required.
|
Expression |
getSequence()
Get the "sequence" expression - the one to which the variable is bound
|
RangeVariableDeclaration |
getVariableDeclaration()
Get the variable declaration
|
int |
getVariableFingerprint() |
java.lang.String |
getVariableName(NamePool pool)
Get the display name of the range variable, for diagnostics only
|
int |
getVariableNameCode() |
boolean |
isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign
extension element.
|
boolean |
isGlobal()
Indicate whether the binding is local or global.
|
java.util.Iterator |
iterateSubExpressions()
Get the immediate subexpressions of this expression
|
Expression |
promote(PromotionOffer offer)
Promote this expression if possible
|
protected Expression |
promoteWhereClause(Binding positionBinding)
Promote a WHERE clause whose condition doesn't depend on the variable being bound.
|
boolean |
replaceSubExpression(Expression original,
Expression replacement)
Replace one subexpression by a replacement subexpression
|
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 |
setSequence(Expression sequence)
Set the "sequence" expression - the one to which the variable is bound
|
void |
setSlotNumber(int nr)
Set the slot number for the range variable
|
void |
setVariableDeclaration(RangeVariableDeclaration decl)
Set the reference to the variable declaration
|
Expression |
simplify(StaticContext env)
Simplify the expression
|
void |
suppressValidation(int validationMode)
Suppress validation on contained element constructors, on the grounds that the parent element
is already performing validation.
|
adoptChildExpression, checkPermittedContents, computeCardinality, computeDependencies, computeSpecialProperties, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterate, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, typeErrorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisplay, getItemType, optimize, typeCheckprotected int slotNumber
protected Expression sequence
protected Expression action
protected java.lang.String variableName
protected int nameCode
protected transient RangeVariableDeclaration declaration
public void setVariableDeclaration(RangeVariableDeclaration decl)
public RangeVariableDeclaration getVariableDeclaration()
public void setAction(Expression action)
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 final boolean isGlobal()
public final boolean isAssignable()
isAssignable in interface Bindingpublic int getLocalSlotNumber()
getLocalSlotNumber in interface Bindingpublic Expression getAction()
public void setSequence(Expression sequence)
public Expression getSequence()
public void setSlotNumber(int nr)
public int getRequiredSlots()
public Expression simplify(StaticContext env) throws XPathException
simplify in interface Expressionsimplify in class ComputedExpressionenv - the static contextXPathException - if an error is discovered during expression
rewritingpublic Expression promote(PromotionOffer offer) throws XPathException
promote in interface Expressionpromote in class ComputedExpressionoffer - details of the offer, for example the offer to move
expressions that don't depend on the context to an outer level in
the containing expressionXPathException - if any error is detectedpublic void suppressValidation(int validationMode)
suppressValidation in class ComputedExpressionprotected Binding[] extendBindingList(Binding[] in)
protected Expression promoteWhereClause(Binding positionBinding)
let $i := SEQ return if (C) then R else ()
to the form:
if (C) then (let $i := SEQ return R) else ()
public java.util.Iterator iterateSubExpressions()
iterateSubExpressions in interface ExpressioniterateSubExpressions in class ComputedExpressionpublic boolean replaceSubExpression(Expression original, Expression replacement)
replaceSubExpression in interface ContainerreplaceSubExpression in class ComputedExpressionoriginal - the original subexpressionreplacement - the replacement subexpressionpublic int getVariableNameCode()
public int getVariableFingerprint()
public java.lang.String getVariableName(NamePool pool)
public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException
evaluateVariable in interface BindingXPathException