Package net.sf.saxon.expr
Class PositionVariable
- java.lang.Object
-
- net.sf.saxon.expr.PositionVariable
-
-
Constructor Summary
Constructors Constructor Description PositionVariable()Create a RangeVariable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueRepresentationevaluateVariable(XPathContext context)Get the value of the range variableintgetLocalSlotNumber()If this is a local variable held on the local stack frame, return the corresponding slot number.SequenceTypegetRequiredType()Get the required type (declared type) of the variableStructuredQNamegetVariableQName()Get the name of the variable, as a namepool name codebooleanisAssignable()Test whether it is permitted to assign to the variable using the saxon:assign extension element.booleanisGlobal()Indicate whether the binding is local or global.voidsetSlotNumber(int nr)Set the slot number for the range variablevoidsetVariableQName(StructuredQName variableName)Set the name of the variable
-
-
-
Method Detail
-
getVariableQName
public StructuredQName getVariableQName()
Get the name of the variable, as a namepool name code- Specified by:
getVariableQNamein interfaceBinding- Returns:
- the nameCode
-
getRequiredType
public SequenceType getRequiredType()
Get the required type (declared type) of the variable- Specified by:
getRequiredTypein interfaceBinding- Returns:
- the required type
-
setVariableQName
public void setVariableQName(StructuredQName variableName)
Set the name of the variable- Parameters:
variableName- the name of the variable
-
setSlotNumber
public void setSlotNumber(int nr)
Set the slot number for the range variable- Parameters:
nr- the slot number to be used
-
getLocalSlotNumber
public int getLocalSlotNumber()
If this is a local variable held on the local stack frame, return the corresponding slot number. In other cases, return -1.- Specified by:
getLocalSlotNumberin interfaceBinding- Returns:
- the slot number on the local stack frame
-
evaluateVariable
public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException
Get the value of the range variable- Specified by:
evaluateVariablein interfaceBinding- Parameters:
context- the XPath dynamic evaluation context- Returns:
- the result of evaluating the variable
- Throws:
XPathException
-
isAssignable
public boolean isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign extension element. This will only be for an XSLT global variable where the extra attribute saxon:assignable="yes" is present.- Specified by:
isAssignablein interfaceBinding- Returns:
- true if the binding is assignable
-
-