public class XPathExpression
extends java.lang.Object
Modifier | Constructor | Description |
---|---|---|
protected |
XPathExpression(XPathEvaluator evaluator,
Expression exp) |
The constructor is protected, to ensure that instances can only be
created using the createExpression() method of XPathEvaluator
|
Modifier and Type | Method | Description |
---|---|---|
XPathContext |
createDynamicContext(Item contextItem) |
Create a dynamic context suitable for evaluating this expression
|
java.util.List |
evaluate(javax.xml.transform.Source source) |
Execute a prepared XPath expression, returning the results as a List.
|
java.lang.Object |
evaluateSingle(javax.xml.transform.Source source) |
Execute a prepared XPath expression, returning the first item in the result.
|
Expression |
getInternalExpression() |
Low-level method to get the internal Saxon expression object.
|
SequenceIterator |
rawIterator(javax.xml.transform.Source source) |
Get a raw iterator over the results of the expression.
|
protected void |
setStackFrameMap(SlotManager map) |
Define the number of slots needed for local variables within the expression
|
protected XPathExpression(XPathEvaluator evaluator, Expression exp)
protected void setStackFrameMap(SlotManager map)
public XPathContext createDynamicContext(Item contextItem)
contextItem
- the initial context itempublic java.util.List evaluate(javax.xml.transform.Source source) throws XPathException
source
- the document or other node against which the XPath expression
will be evaluated. This may be a Saxon NodeInfo object, representing a node in an
existing tree, or it may be any kind of JAXP Source object such as a StreamSource
SAXSource or DOMSource.XPathException
public java.lang.Object evaluateSingle(javax.xml.transform.Source source) throws XPathException
source
- the document or other node against which the XPath expression
will be evaluated. This may be a Saxon NodeInfo object, representing a node in an
existing tree, or it may be any kind of JAXP Source object such as a StreamSource
SAXSource or DOMSource.XPathException
public SequenceIterator rawIterator(javax.xml.transform.Source source) throws XPathException
source
- the document or other node against which the XPath expression
will be evaluated. This may be a Saxon NodeInfo object, representing a node in an
existing tree, or it may be any kind of JAXP Source object such as a StreamSource
SAXSource or DOMSource.XPathException
public Expression getInternalExpression()