java.io.Serializable, javax.xml.transform.SourceLocator, LocationProvider, SaxonLocator, Binding, Container, EvaluableItem, SequenceIterable, TailCallReturner, InstructionInfo, org.xml.sax.LocatorGlobalParampublic class GlobalVariable extends GeneralVariable implements Container
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticPropertiesevaluationMode, referenceCount, slotNumber, variableQName| Constructor | Description |
|---|---|
GlobalVariable() |
Create a global variable
|
| Modifier and Type | Method | Description |
|---|---|---|
ValueRepresentation |
evaluateVariable(XPathContext context) |
Evaluate the variable
|
Executable |
getExecutable() |
Get the executable containing this global variable
|
int |
getHostLanguage() |
Get the host language for this declaration
|
ValueRepresentation |
getSelectValue(XPathContext context) |
Evaluate the variable.
|
boolean |
isGlobal() |
Is this a global variable?
|
void |
lookForCycles(java.util.Stack referees,
XQueryFunctionLibrary globalFunctionLibrary) |
Check for cycles in this variable definition
|
TailCall |
processLeavingTail(XPathContext context) |
Process the variable declaration
|
void |
setContainsLocals(SlotManager map) |
The expression that initializes a global variable may itself use local variables.
|
void |
setExecutable(Executable executable) |
Set the containing executable
|
void |
setHostLanguage(int language) |
Set the host language for this declaration
|
getLocationProvider, replaceSubExpressionaddToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, findParentOf, getColumnNumber, getColumnNumber, getContainer, getDependencies, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toString, typeErrorcopy, evaluateItem, explain, getCardinality, getEvaluationMode, getInstructionNameCode, getItemType, getLocalSlotNumber, getRequiredType, getSelectExpression, getSlotNumber, getVariableQName, init, isAssignable, isImplicitlyRequiredParam, isRequiredParam, isTunnelParam, iterate, iterateSubExpressions, optimize, promoteInst, replaceSubExpression, setAssignable, setImplicitlyRequiredParam, setReferenceCount, setRequiredParam, setRequiredType, setSelectExpression, setSlotNumber, setTunnel, setVariableQName, simplify, typeCheckassembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, createsNewNodes, dynamicError, evaluateAsString, getConstructType, getImplementationMethod, getSourceLocator, isXSLT, process, promotepublic Executable getExecutable()
getExecutable in interface ContainergetExecutable in class Expressionpublic void setExecutable(Executable executable)
executable - the executable that contains this global variablepublic void setHostLanguage(int language)
language - the host language (for example XSLT, XQuery)public int getHostLanguage()
getHostLanguage in interface ContainergetHostLanguage in class Expressionpublic void setContainsLocals(SlotManager map)
map - The stack frame map for local variables used while evaluating this global
variable.public boolean isGlobal()
isGlobal in interface BindingisGlobal in class GeneralVariablepublic void lookForCycles(java.util.Stack referees,
XQueryFunctionLibrary globalFunctionLibrary)
throws XPathException
referees - the calls leading up to this one; it's an error if this variable is on the
stack, because that means it calls itself directly or indirectly. The stack may contain
variable definitions (GlobalVariable objects) and user-defined functions (UserFunction objects).
It will never contain the same object more than once.globalFunctionLibrary - the library containing all global functionsXPathExceptionpublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail in interface TailCallReturnerprocessLeavingTail in class Instructioncontext - The dynamic context of the transformation, giving access to the current node,
the current variables, etc.XPathExceptionpublic ValueRepresentation getSelectValue(XPathContext context) throws XPathException
getSelectValue in class GeneralVariablecontext - the XPath dynamic contextXPathExceptionpublic ValueRepresentation evaluateVariable(XPathContext context) throws XPathException
evaluateVariable in interface Bindingcontext - the XPath dynamic evaluation contextXPathException