net.sf.saxon.query
public class GlobalVariableDefinition extends Object implements VariableDeclaration, Declaration
Field Summary | |
---|---|
protected List | references |
Method Summary | |
---|---|
GlobalVariable | compile(Executable exec, int slot)
Create a compiled representation of this global variable |
void | explain(ExpressionPresenter out)
Produce diagnostic output showing the compiled and optimized expression tree for a function |
int | getColumnNumber()
Get column number |
GlobalVariable | getCompiledVariable()
Get the compiled variable if the definition has been compiled |
int | getLineNumber()
Get the line number where the declaration appears |
String | getPublicId()
Get public identifier |
SequenceType | getRequiredType()
Get the required type of the variable |
String | getSystemId()
Get the system ID of the module containing the variable declaration |
Expression | getValueExpression()
Get the expression used to initialize the value of the variable |
StructuredQName | getVariableQName()
Get the variable name |
boolean | isParameter()
Ask whether this global variable is a "parameter" (an external variable, in XQuery terminology) |
Iterator | iterateReferences()
Iterate over the references to this variable |
void | registerReference(BindingReference ref)
Register a variable reference that refers to this global variable |
void | setIsParameter(boolean b)
Say whether this global variable is a "parameter" (an external variable, in XQuery terminology) |
void | setLineNumber(int lineNumber)
Set the line number where the variable declaration appears in the source |
void | setRequiredType(SequenceType type)
Set the required type of the variable |
void | setSystemId(String systemId)
Set the system ID of the module where the variable declaration appears |
void | setValueExpression(Expression val)
Set the expression used to define the value of the variable |
void | setVariableQName(StructuredQName qName)
Set the variable name |
void | typeCheck(ExpressionVisitor visitor)
Type check the compiled representation of this global variable |
Parameters: exec the executable slot the slot number allocated to this variable
Returns: the compiled representation
Throws: XPathException if compile-time errors are found.
Parameters: out the destination to be used
Returns: -1 always
Returns: the compiled global variable
Returns: null always
Returns: the declared type, from the "as" clause if present
Returns: the System ID (base URI)
Returns: the initializing expression
Returns: the variable name
Returns: true if this variable is an external variable
Returns: an iterator over the references: returns objects of class VariableReference
Parameters: ref the variable reference
Parameters: b true if this variable is external
Parameters: lineNumber the line number
Parameters: type the declared type, from the "as" clause if present
Parameters: systemId the System ID (base URI)
Parameters: val the initializing expression
Parameters: qName the variable name
Parameters: visitor an expression visitor
Throws: XPathException if compile-time errors are found.