|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.saxon.trans.Variable
An object representing an XPath variable for use in the standalone XPath API. The object can only be created by calling the declareVariable method of class StandaloneContext.
| Method Summary | |
ValueRepresentation |
evaluateVariable(XPathContext context)
Get the value of the variable. |
int |
getLocalSlotNumber()
If this is a local variable held on the local stack frame, return the corresponding slot number. |
int |
getNameCode()
Establish the nameCode of the name of this variable. |
java.lang.String |
getVariableName()
Get the name of the variable. |
boolean |
isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign extension element. |
boolean |
isGlobal()
Indicate whether the binding is local or global. |
static Variable |
make(QNameValue name,
Configuration config)
Factory method, for use by the declareVariable method of class StandaloneContext |
static Variable |
make(java.lang.String qname,
Configuration config)
Deprecated. since 8.5: use make(QNameValue, Configuration) |
void |
registerReference(BindingReference ref)
Method called by the XPath expression parser to register a reference to this variable. |
void |
setValue(java.lang.Object value)
Assign a value to the variable. |
void |
setXPathValue(ValueRepresentation value)
Assign a value to the variable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static Variable make(QNameValue name,
Configuration config)
public static Variable make(java.lang.String qname,
Configuration config)
throws XPathException
make(QNameValue, Configuration)
qname - the lexical QName of the variable name
XPathExceptionpublic boolean isGlobal()
isGlobal in interface Bindingpublic final boolean isAssignable()
isAssignable in interface Bindingpublic int getLocalSlotNumber()
getLocalSlotNumber in interface Bindingpublic java.lang.String getVariableName()
getVariableName in interface VariableDeclarationpublic int getNameCode()
getNameCode in interface VariableDeclaration
public void setValue(java.lang.Object value)
throws XPathException
value - the value of the variable, as a Java object. This is converted to the "best fit"
XPath data type.
XPathException - if the Java value cannot be converted to an XPath typepublic void setXPathValue(ValueRepresentation value)
value - the value of the variable, which must be an instance of a class
representing a value in the XPath model.public void registerReference(BindingReference ref)
registerReference in interface VariableDeclarationpublic ValueRepresentation evaluateVariable(XPathContext context)
evaluateVariable in interface Bindingcontext - The dynamic evaluation context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||