net.sf.saxon.sxpath
public class XPathDynamicContext extends Object
This object is always created via the method createDynamicContext
Constructor Summary | |
---|---|
protected | XPathDynamicContext(XPathContextMajor contextObject, SlotManager stackFrameMap) |
Method Summary | |
---|---|
protected void | checkExternalVariables(SlotManager stackFrameMap, int numberOfExternals)
Check that all external variables have been given a value |
Item | getContextItem()
Get the context item |
ErrorListener | getErrorListener()
Get the error listener.
|
URIResolver | getURIResolver()
Get the URI resolver.
|
XPathContext | getXPathContextObject()
For system use: get the wrapped XPathContext object |
void | setContextItem(Item item)
Set the context item for evaluation of the XPath Expression |
void | setContextNode(Source source)
Set the context item to a node derived from a supplied Source object. |
void | setErrorListener(ErrorListener listener)
Set the error listener.
|
void | setURIResolver(URIResolver resolver)
Set an object that will be used to resolve URIs used in
document(), etc.
|
void | setVariable(XPathVariable variable, ValueRepresentation value)
Set the value of an external variable used within the XPath expression |
Parameters: stackFrameMap describes the stack frame numberOfExternals the number of variables that need to be supplied
Throws: XPathException if required variables have not been given a value
Returns: the context item if there is one, or null otherwise
Returns: the ErrorListener in use
Since: 9.2
Returns: the user-supplied URI resolver if there is one, or null otherwise.
Since: 9.2
Returns: the underlying XPathContext object
Parameters: item the context item
Throws: XPathException if the node is in a document that was built under the wrong configuration
Parameters: source The source object representing the node that will be used as the context item
Throws: XPathException if a failure occurs reading or parsing a Source object to build an input tree, or if the source is a document that was built under the wrong configuration
Parameters: listener the ErrorListener to be used
Since: 9.2
Parameters: resolver An object that implements the URIResolver interface, or null.
Since: 9.2
Parameters: variable the object representing the variable, as returned by the XPathEvaluator method. Note that setting the value of a variable does not modify the XPathVariable object itself, which means that this method is thread-safe. value The value of the variable.
Throws: XPathException if the supplied value does not conform to the required type of the variable; or if the supplied value contains a node that does not belong to this Configuration (or another Configuration that shares the same namePool)