| java.lang.Object net.sf.saxon.query.GlobalVariableDefinition
All known Subclasses: net.sf.saxon.query.UndeclaredVariable,
GlobalVariableDefinition | public class GlobalVariableDefinition implements VariableDeclaration,Declaration(Code) | | Class to hold compile-time information about an XQuery global variable
or parameter
|
compile | public GlobalVariable compile(StaticQueryContext env, int slot) throws XPathException(Code) | | Create a compiled representation of this global variable
Parameters: env - the static context for the query module Parameters: slot - the slot number allocated to this variable the compiled representation throws: XPathException - if compile-time errors are found. |
explain | public void explain(NamePool pool)(Code) | | Produce diagnostic output showing the compiled and optimized expression tree for a function
Parameters: pool - the namepool to be used |
getColumnNumber | public int getColumnNumber()(Code) | | Get column number
-1 always |
getCompiledVariable | public GlobalVariable getCompiledVariable()(Code) | | Get the compiled variable if the definition has been compiled
|
getLineNumber | public int getLineNumber()(Code) | | Get the line number where the declaration appears
|
getNameCode | public int getNameCode()(Code) | | Get the variable name
the variable name, expressed as a NamePool name code |
getPublicId | public String getPublicId()(Code) | | Get public identifier
null always |
getRequiredType | public SequenceType getRequiredType()(Code) | | Get the required type of the variable
the declared type, from the "as" clause if present |
getSystemId | public String getSystemId()(Code) | | Get the system ID of the module containing the variable declaration
|
getVariableName | public String getVariableName()(Code) | | Get the name of the variable
the variable name, as a lexical QName |
iterateReferences | public Iterator iterateReferences()(Code) | | Iterate over the references to this variable
|
registerReference | public void registerReference(BindingReference ref)(Code) | | Register a variable reference that refers to this global variable
Parameters: ref - the variable reference |
setIsParameter | public void setIsParameter(boolean b)(Code) | | Indicate whether this global variable is a "parameter" (an external variable, in XQuery terminology)
Parameters: b - true if this variable is external |
setLineNumber | public void setLineNumber(int lineNumber)(Code) | | Set the line number where the variable declaration appears in the source
Parameters: lineNumber - the line number |
setNameCode | public void setNameCode(int nameCode)(Code) | | Set the variable name
Parameters: nameCode - the variable name, expressed as a NamePool name code |
setRequiredType | public void setRequiredType(SequenceType type)(Code) | | Set the required type of the variable
Parameters: type - the declared type, from the "as" clause if present |
setSystemId | public void setSystemId(String systemId)(Code) | | Set the system ID of the module where the variable declaration appears
|
setValueExpression | public void setValueExpression(Expression val)(Code) | | Set the expression used to define the value of the variable
Parameters: val - the initializing expression |
setVariableName | public void setVariableName(String variableName)(Code) | | Set the variable name
Parameters: variableName - the variable name, as a lexical QName |
|
|