|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.sxpath.XPathDynamicContext
public class XPathDynamicContext
This object represents the dynamic XPath execution context for use in the free-standing Saxon XPath API. The dynamic context holds the context item and the values of external variables used by the XPath expression.
This object is always created via the method
XPathExpression.createDynamicContext(net.sf.saxon.om.Item)
Method Summary | |
---|---|
Item |
getContextItem()
Get the context item |
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 |
setVariable(XPathVariable variable,
ValueRepresentation value)
Set the value of an external variable used within the XPath expression |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setContextNode(Source source) throws XPathException
NodeInfo
interface, representing a node in a tree, is one such
implementation; others include StreamSource
,
SAXSource
, and DOMSource
source
- The source object representing the node that will be used as the context item
XPathException
- if a failure occurs reading or parsing a Source object to build an input treepublic void setContextItem(Item item)
item
- the context itempublic Item getContextItem()
public void setVariable(XPathVariable variable, ValueRepresentation value)
variable
- the object representing the variable, as returned by the
XPathEvaluator.declareVariable(String, String)
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.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |