net.sf.saxon.instruct
public class GlobalVariable extends GeneralVariable implements Container
Constructor Summary | |
---|---|
GlobalVariable()
Create a global variable |
Method Summary | |
---|---|
ValueRepresentation | evaluateVariable(XPathContext context)
Evaluate the variable |
int | getContainerGranularity()
Get the granularity of the container. |
Executable | getExecutable()
Get the executable containing this global variable |
int | getHostLanguage()
Get the host language (XSLT, XQuery, XPath) used to implement the code in this container |
ValueRepresentation | getSelectValue(XPathContext context)
Evaluate the variable. |
boolean | isGlobal()
Is this a global variable? |
boolean | isIndexedVariable()
Ask whether this is an indexed variable |
void | lookForCycles(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 | setIndexedVariable()
Mark this as an indexed variable, to allow fast searching |
Returns: 0 for a temporary container created during parsing; 1 for a container that operates at the level of an XPath expression; 2 for a container at the level of a global function or template
Returns: the containing executable
Returns: true (yes, it is a global variable)
Returns: true if this variable is indexed
Parameters: 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 functions
Parameters: map The stack frame map for local variables used while evaluating this global variable.
Parameters: executable the executable that contains this global variable