public class XPathDynamicContext
extends java.lang.Object
This object is always created via the method
XPathExpression.createDynamicContext(net.sf.saxon.om.Item)
Modifier | Constructor and Description |
---|---|
protected |
XPathDynamicContext(ItemType contextItemType,
XPathContextMajor contextObject,
SlotManager stackFrameMap) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkExternalVariables(SlotManager stackFrameMap,
int numberOfExternals)
Check that all external variables have been given a value
|
CollectionFinder |
getCollectionFinder()
Get the collection finder associated with this configuration.
|
CollectionURIResolver |
getCollectionURIResolver()
Deprecated.
since 9.7 - use
getCollectionFinder() |
Item |
getContextItem()
Get the context item
|
UnfailingErrorListener |
getErrorListener()
Get the error listener.
|
UnparsedTextURIResolver |
getUnparsedTextURIResolver()
Get the URI resolver for unparsed text.
|
javax.xml.transform.URIResolver |
getURIResolver()
Get the URI resolver.
|
XPathContext |
getXPathContextObject()
For system use: get the wrapped XPathContext object
|
void |
setCollectionFinder(CollectionFinder cf)
Set the collection finder associated with this configuration.
|
void |
setCollectionURIResolver(CollectionURIResolver resolver)
Deprecated.
since 9.7 - use
setCollectionFinder(CollectionFinder) |
void |
setContextItem(Item item)
Set the context item for evaluation of the XPath Expression
|
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Set the error listener.
|
void |
setUnparsedTextURIResolver(UnparsedTextURIResolver resolver)
Set an object that will be used to resolve URIs used in
fn:unparsed-text() and related functions.
|
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Set an object that will be used to resolve URIs used in
document(), etc.
|
void |
setVariable(XPathVariable variable,
Sequence value)
Set the value of an external variable used within the XPath expression
|
protected XPathDynamicContext(ItemType contextItemType, XPathContextMajor contextObject, SlotManager stackFrameMap)
public void setContextItem(Item item) throws XPathException
item
- the context itemXPathException
- if the node is in a document that was built under the wrong configurationpublic Item getContextItem()
public void setVariable(XPathVariable variable, Sequence value) throws XPathException
variable
- the object representing the variable.
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.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)public void setURIResolver(javax.xml.transform.URIResolver resolver)
resolver
- An object that implements the URIResolver interface, or
null.public javax.xml.transform.URIResolver getURIResolver()
public void setCollectionURIResolver(CollectionURIResolver resolver)
setCollectionFinder(CollectionFinder)
resolver
- the resolver for references to collectionspublic CollectionURIResolver getCollectionURIResolver()
getCollectionFinder()
public CollectionFinder getCollectionFinder()
public void setCollectionFinder(CollectionFinder cf)
cf
- the CollectionFinder to be usedpublic void setErrorListener(javax.xml.transform.ErrorListener listener)
listener
- the ErrorListener to be usedpublic UnfailingErrorListener getErrorListener()
public XPathContext getXPathContextObject()
public void setUnparsedTextURIResolver(UnparsedTextURIResolver resolver)
resolver
- An object that implements the UnparsedTextURIResolver interface, or
null.public UnparsedTextURIResolver getUnparsedTextURIResolver()
protected void checkExternalVariables(SlotManager stackFrameMap, int numberOfExternals) throws XPathException
stackFrameMap
- describes the stack framenumberOfExternals
- the number of variables that need to be suppliedXPathException
- if required variables have not been given a valueCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.