net.sf.saxon.sxpath
public final class XPathVariable extends Object implements VariableDeclaration, Binding, Serializable
A variable can be given a value by calling XPathDynamicContext. Note that the value of the variable is not held in the XPathVariable object, but in the XPathDynamicContext, which means that the XPathVariable itself can be used in multiple threads.
Method Summary | |
---|---|
ValueRepresentation | evaluateVariable(XPathContext context)
Get the value of the variable. |
int | getLocalSlotNumber()
If this is a local variable held on the local stack frame, return the corresponding slot number.
|
SequenceType | getRequiredType()
Get the required type of this variable. |
StructuredQName | getVariableQName()
Get the name of the variable as a QNameValue. |
boolean | isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign
extension element. |
boolean | isGlobal()
Ask whether the binding is local or global. |
protected static XPathVariable | make(StructuredQName name)
Factory method, for use by the declareVariable method of class IndependentContext |
void | registerReference(BindingReference ref)
Method called by the XPath expression parser to register a reference to this variable.
|
void | setRequiredType(SequenceType requiredType)
Set the required type of this variable. |
void | setSlotNumber(int slotNumber)
Set the slot number allocated to this variable. |
Parameters: context The dynamic evaluation context
Returns: The value of the variable
item()*
is returned.Returns: the required type of the variable
Returns: the name of the variable, as a QNameValue
Returns: false (always)
Returns: false (always)
Parameters: name the name of the variable to create
Returns: the constructed XPathVariable
item()*
is assumed.Parameters: requiredType the required type
Parameters: slotNumber the slot number to be allocated