Package net.sf.saxon.expr.parser
Class ParserExtension.TemporaryXSLTVariableBinding
- java.lang.Object
-
- net.sf.saxon.expr.parser.ParserExtension.TemporaryXSLTVariableBinding
-
- All Implemented Interfaces:
Binding
,LocalBinding
- Enclosing class:
- ParserExtension
public static class ParserExtension.TemporaryXSLTVariableBinding extends java.lang.Object implements LocalBinding
-
-
Constructor Summary
Constructors Constructor Description TemporaryXSLTVariableBinding(SourceBinding decl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReference(VariableReference ref, boolean isLoopingReference)
Register a variable reference that refers to the variable bound in this expressionSequence
evaluateVariable(XPathContext context)
Evaluate the variableIntegerValue[]
getIntegerBoundsForVariable()
If the variable is bound to an integer, get the minimum and maximum possible values.int
getLocalSlotNumber()
Return the slot number of the variable held on the local stack frameSequenceType
getRequiredType()
Get the declared type of the variableStructuredQName
getVariableQName()
Get the name of the variableboolean
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.boolean
isIndexedVariable()
Ask whether the binding is to be indexedvoid
setIndexedVariable()
Say that the bound value has the potential to be indexed
-
-
-
Constructor Detail
-
TemporaryXSLTVariableBinding
public TemporaryXSLTVariableBinding(SourceBinding decl)
-
-
Method Detail
-
getRequiredType
public SequenceType getRequiredType()
Description copied from interface:Binding
Get the declared type of the variable- Specified by:
getRequiredType
in interfaceBinding
- Returns:
- the declared type
-
evaluateVariable
public Sequence evaluateVariable(XPathContext context)
Description copied from interface:Binding
Evaluate the variable- Specified by:
evaluateVariable
in interfaceBinding
- Parameters:
context
- the XPath dynamic evaluation context- Returns:
- the result of evaluating the variable
-
isGlobal
public boolean isGlobal()
Description copied from interface:Binding
Indicate whether the binding is local or global. A global binding is one that has a fixed value for the life of a query or transformation; any other binding is local.
-
isAssignable
public boolean isAssignable()
Description copied from interface:Binding
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:
isAssignable
in interfaceBinding
- Returns:
- true if the binding is assignable
-
getLocalSlotNumber
public int getLocalSlotNumber()
Description copied from interface:LocalBinding
Return the slot number of the variable held on the local stack frame- Specified by:
getLocalSlotNumber
in interfaceLocalBinding
- Returns:
- the slot number on the local stack frame
-
getVariableQName
public StructuredQName getVariableQName()
Description copied from interface:Binding
Get the name of the variable- Specified by:
getVariableQName
in interfaceBinding
- Returns:
- the name of the variable, as a structured QName
-
addReference
public void addReference(VariableReference ref, boolean isLoopingReference)
Description copied from interface:Binding
Register a variable reference that refers to the variable bound in this expression- Specified by:
addReference
in interfaceBinding
- Parameters:
ref
- the variable referenceisLoopingReference
- - true if the reference occurs within a loop, such as the predicate of a filter expression
-
getIntegerBoundsForVariable
public IntegerValue[] getIntegerBoundsForVariable()
Description copied from interface:Binding
If the variable is bound to an integer, get the minimum and maximum possible values. Return null if unknown or not applicable- Specified by:
getIntegerBoundsForVariable
in interfaceBinding
- Returns:
- a pair of integers containing the minimum and maximum values for the integer value; or null if the value is not an integer or the range is unknown
-
setIndexedVariable
public void setIndexedVariable()
Description copied from interface:LocalBinding
Say that the bound value has the potential to be indexed- Specified by:
setIndexedVariable
in interfaceLocalBinding
-
isIndexedVariable
public boolean isIndexedVariable()
Description copied from interface:LocalBinding
Ask whether the binding is to be indexed- Specified by:
isIndexedVariable
in interfaceLocalBinding
- Returns:
- true if the variable value can be indexed
-
-