org.apache.xml.security.utils
Class XalanXPathAPI

java.lang.Object
  extended by org.apache.xml.security.utils.XalanXPathAPI
All Implemented Interfaces:
XPathAPI

public class XalanXPathAPI
extends Object
implements XPathAPI

An implementation of XPathAPI using Xalan. This supports the "here()" function defined in the digital signature spec.


Constructor Summary
XalanXPathAPI()
           
 
Method Summary
 void clear()
          Clear any context information from this object
 boolean evaluate(Node contextNode, Node xpathnode, String str, Node namespaceNode)
          Evaluate an XPath string and return true if the output is to be included or not.
static boolean isInstalled()
           
 NodeList selectNodeList(Node contextNode, Node xpathnode, String str, Node namespaceNode)
          Use an XPath string to select a nodelist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XalanXPathAPI

public XalanXPathAPI()
Method Detail

selectNodeList

public NodeList selectNodeList(Node contextNode,
                               Node xpathnode,
                               String str,
                               Node namespaceNode)
                        throws TransformerException
Use an XPath string to select a nodelist. XPath namespace prefixes are resolved from the namespaceNode.

Specified by:
selectNodeList in interface XPathAPI
Parameters:
contextNode - The node to start searching from.
xpathnode -
str -
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Returns:
A NodeIterator, should never be null.
Throws:
TransformerException

evaluate

public boolean evaluate(Node contextNode,
                        Node xpathnode,
                        String str,
                        Node namespaceNode)
                 throws TransformerException
Evaluate an XPath string and return true if the output is to be included or not.

Specified by:
evaluate in interface XPathAPI
Parameters:
contextNode - The node to start searching from.
xpathnode - The XPath node
str - The XPath expression
namespaceNode - The node from which prefixes in the XPath will be resolved to namespaces.
Throws:
TransformerException

clear

public void clear()
Clear any context information from this object

Specified by:
clear in interface XPathAPI

isInstalled

public static boolean isInstalled()


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.