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 voidaddReference(VariableReference ref, boolean isLoopingReference)Register a variable reference that refers to the variable bound in this expressionSequenceevaluateVariable(XPathContext context)Evaluate the variableIntegerValue[]getIntegerBoundsForVariable()If the variable is bound to an integer, get the minimum and maximum possible values.intgetLocalSlotNumber()Return the slot number of the variable held on the local stack frameSequenceTypegetRequiredType()Get the declared type of the variableStructuredQNamegetVariableQName()Get the name of the variablebooleanisAssignable()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.booleanisIndexedVariable()Ask whether the binding is to be indexedvoidsetIndexedVariable()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:BindingGet the declared type of the variable- Specified by:
getRequiredTypein interfaceBinding- Returns:
- the declared type
-
evaluateVariable
public Sequence evaluateVariable(XPathContext context)
Description copied from interface:BindingEvaluate the variable- Specified by:
evaluateVariablein interfaceBinding- Parameters:
context- the XPath dynamic evaluation context- Returns:
- the result of evaluating the variable
-
isGlobal
public boolean isGlobal()
Description copied from interface:BindingIndicate 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:BindingTest 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
-
getLocalSlotNumber
public int getLocalSlotNumber()
Description copied from interface:LocalBindingReturn the slot number of the variable held on the local stack frame- Specified by:
getLocalSlotNumberin interfaceLocalBinding- Returns:
- the slot number on the local stack frame
-
getVariableQName
public StructuredQName getVariableQName()
Description copied from interface:BindingGet the name of the variable- Specified by:
getVariableQNamein interfaceBinding- Returns:
- the name of the variable, as a structured QName
-
addReference
public void addReference(VariableReference ref, boolean isLoopingReference)
Description copied from interface:BindingRegister a variable reference that refers to the variable bound in this expression- Specified by:
addReferencein 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:BindingIf the variable is bound to an integer, get the minimum and maximum possible values. Return null if unknown or not applicable- Specified by:
getIntegerBoundsForVariablein 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:LocalBindingSay that the bound value has the potential to be indexed- Specified by:
setIndexedVariablein interfaceLocalBinding
-
isIndexedVariable
public boolean isIndexedVariable()
Description copied from interface:LocalBindingAsk whether the binding is to be indexed- Specified by:
isIndexedVariablein interfaceLocalBinding- Returns:
- true if the variable value can be indexed
-
-