public class XPathEvaluatorOld extends XPathEvaluator
XPathEvaluatorOldable to evaluate XPaths as defined by XML Path Language (XPath) Version 1.0.
This XPathEvaluatorOld supports the the
here() function as
defined by XML-Signature
Syntax and Processing:
Function: node-set here()
The here function returns a node-set containing the attribute or processing instruction node or the parent element of the text node that directly bears the XPath expression. This expression results in an error if the containing XPath expression does not appear in the same XML document against which the XPath expression is being evaluated.
|Modifier and Type||Class and Description|
PrefixResolver used to resolve resolve namespace prefix to URI mappings.
A context owner of an
|Constructor and Description|
Creates a new
|Modifier and Type||Method and Description|
Evaluate XPath with the given node as context node.
Evaluate XPath with the given node as context node and convert the result to a boolean.
newXPathEvaluator, newXPathEvaluator, prefixExtFunc
public XPathEvaluatorOld(String xpathExpr, Node ownerNode, Map additionalNSPrefixes, DOMCryptoContext cryptoContext) throws XPathException
XPathEvaluatorOldusing the given XPath expression, the given
ownerNodeas node returned by the
here()function and as namespace context node and the
xpathExpr- the XPath expression
ownerNode- the node returned by the
here()function and used as namespace context node
Mapfrom namespace prefixes (
String) to namespace URI (
cryptoContext- the context that holds the
xsd:Idattribute mapping (may be
XPathException- if setting up the XPath context fails, e.g. the provided XPath expression couldn't be evaluated
public Iterator evaluate(Node contextNode) throws XPathException
public boolean evaluateBoolean(Node contextNode) throws XPathException
Function: boolean boolean(object)
The boolean function converts its argument to a boolean as follows:
a number is true if and only if it is neither positive or negative zero nor NaN
a node-set is true if and only if it is non-empty
a string is true if and only if its length is non-zero
an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type
© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC