public class XPathUtilsImpl extends XPathUtilsInterface
XPathUtilsInterface, which is shipped with the IXSIL toolkit.
This implementation is based on Apache Xalan 2.5.1.| Modifier and Type | Class and Description |
|---|---|
protected class |
XPathUtilsImpl.IXSILPrefixResolver
Special extension of the
PrefixResolverDefault interface. |
protected class |
XPathUtilsImpl.XPathUtilsXPathContextOwner
ExtensionsProvider implementation used for integrating the XMLDSIG here() function as extension
function into the Xalan engine.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.xml.utils.PrefixResolver |
prefixResolver_
The prefix resolver for the XPath engine.
|
protected org.apache.xpath.XPath |
xPath_
The XPath engine.
|
protected org.apache.xpath.XPathContext |
xPathContext_
The XPath context for the XPath engine.
|
| Constructor and Description |
|---|
XPathUtilsImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
selectBoolean(org.w3c.dom.Node contextNode)
Uses an XPath epression to compute a boolean result.
|
org.w3c.dom.Element |
selectElement(org.w3c.dom.Node contextNode)
Uses an XPath epression to select a single Element node.
|
org.w3c.dom.NodeList |
selectNodeSet(org.w3c.dom.Node contextNode)
Uses an XPath epression to select a set of nodes.
|
void |
setupContext(java.lang.String xPathExpr,
org.w3c.dom.Node namespaceNode,
java.lang.String additionalNSPrefixes,
org.w3c.dom.NodeList hereResult)
Sets up the XPath context.
|
getInstanceprotected org.apache.xpath.XPathContext xPathContext_
protected org.apache.xml.utils.PrefixResolver prefixResolver_
protected org.apache.xpath.XPath xPath_
public void setupContext(java.lang.String xPathExpr,
org.w3c.dom.Node namespaceNode,
java.lang.String additionalNSPrefixes,
org.w3c.dom.NodeList hereResult)
throws XPathUtilsException
XPathUtilsInterfaceXPathUtilsInterface.selectBoolean(org.w3c.dom.Node), XPathUtilsInterface.selectElement(org.w3c.dom.Node) and
XPathUtilsInterface.selectNodeSet(org.w3c.dom.Node) will operate on this context.setupContext in class XPathUtilsInterfacexPathExpr - A string specifying the XPath expression. Must not be null.namespaceNode - The namespace declarations in scope for this node will be used as the set of
namespace declarations for the XPath computation. May be null.additionalNSPrefixes - Allows the specification of additional namespace prefixes which can be used
in the XPath expression. The value of the parameter consists of pairs of
prefix to namespace URI attributions separated by spaces, i. e.
"prefix1 uri1 prefix2 uri2 ...". May be null.hereResult - The result which should be returned by the XPath extension function call here()
. The here() extension function has been introduced in XML Signature,
XPath Filtering. May be null if the here() function
will not be used. If not null, the NodeList must contain a
single Element, Attr or
ProcessingInstruction node.XPathUtilsException - if the XPath engine returns an error.XPathUtilsInterface.setupContext(java.lang.String, org.w3c.dom.Node, java.lang.String, org.w3c.dom.NodeList)public org.w3c.dom.NodeList selectNodeSet(org.w3c.dom.Node contextNode)
throws XPathUtilsException
XPathUtilsInterfaceselectNodeSet in class XPathUtilsInterfacecontextNode - The node specifiying the context for the XPath manipulation. Must not be null
.XPathUtilsException - if the XPath engine returns an error, or if the result of processing the
XPath is not a set of nodes.XPathUtilsInterface.selectNodeSet(org.w3c.dom.Node)public boolean selectBoolean(org.w3c.dom.Node contextNode)
throws XPathUtilsException
XPathUtilsInterfaceselectBoolean in class XPathUtilsInterfacecontextNode - The node specifiying the context for the XPath manipulation. Must not be null
.XPathUtilsException - if the XPath engine returns an error, or if the result cannot be
converted into a boolean value.XPathUtilsInterface.selectBoolean(org.w3c.dom.Node)public org.w3c.dom.Element selectElement(org.w3c.dom.Node contextNode)
throws XPathUtilsException
XPathUtilsInterfaceselectElement in class XPathUtilsInterfacecontextNode - The node specifiying the context for the XPath manipulation. Must not be null
.XPathUtilsException - if the XPath engine returns an error, or if the result is not a single
Element Node.XPathUtilsInterface.selectElement(org.w3c.dom.Node)