net.sf.saxon.instruct

Class GlobalVariable

public class GlobalVariable extends GeneralVariable implements Container

A compiled global variable in a stylesheet or query.
Constructor Summary
GlobalVariable()
Method Summary
ValueRepresentationevaluateVariable(XPathContext context)
Evaluate the variable
ExecutablegetExecutable()
intgetHostLanguage()
InstructionInfogetInstructionInfo()
Get InstructionInfo for this expression
ValueRepresentationgetSelectValue(XPathContext context)
Evaluate the variable.
booleanisGlobal()
voidlookForCycles(Stack referees)
Check for cycles in this variable definition
TailCallprocessLeavingTail(XPathContext context)
Process the variable declaration
voidsetContainsLocals(SlotManager map)
voidsetExecutable(Executable executable)
voidsetHostLanguage(int language)

Constructor Detail

GlobalVariable

public GlobalVariable()

Method Detail

evaluateVariable

public ValueRepresentation evaluateVariable(XPathContext context)
Evaluate the variable

getExecutable

public Executable getExecutable()

getHostLanguage

public int getHostLanguage()

getInstructionInfo

public InstructionInfo getInstructionInfo()
Get InstructionInfo for this expression

getSelectValue

public ValueRepresentation getSelectValue(XPathContext context)
Evaluate the variable. That is, get the value of the select expression if present or the content of the element otherwise, either as a tree or as a sequence

isGlobal

public boolean isGlobal()

lookForCycles

public void lookForCycles(Stack referees)
Check for cycles in this variable definition

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.

processLeavingTail

public TailCall processLeavingTail(XPathContext context)
Process the variable declaration

setContainsLocals

public void setContainsLocals(SlotManager map)

setExecutable

public void setExecutable(Executable executable)

setHostLanguage

public void setHostLanguage(int language)