Class XalanXPathAPI
java.lang.Object
org.apache.xml.security.utils.XalanXPathAPI
- All Implemented Interfaces:
XPathAPI
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear any context information from this objectprivate org.apache.xpath.XPathcreateXPath(String str, org.apache.xml.utils.PrefixResolver prefixResolver) private org.apache.xpath.objects.XObjectbooleanEvaluate an XPath string and return true if the output is to be included or not.private static voidstatic booleanselectNodeList(Node contextNode, Node xpathnode, String str, Node namespaceNode) Use an XPath string to select a nodelist.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
xpathStr
-
xpath
private org.apache.xpath.XPath xpath -
funcTable
private static org.apache.xpath.compiler.FunctionTable funcTable -
installed
private static boolean installed -
context
private org.apache.xpath.XPathContext context
-
-
Constructor Details
-
XalanXPathAPI
public XalanXPathAPI()
-
-
Method Details
-
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:
selectNodeListin interfaceXPathAPI- 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:
evaluatein interfaceXPathAPI- Parameters:
contextNode- The node to start searching from.xpathnode- The XPath nodestr- The XPath expressionnamespaceNode- The node from which prefixes in the XPath will be resolved to namespaces.- Throws:
TransformerException
-
clear
-
isInstalled
public static boolean isInstalled() -
eval
private org.apache.xpath.objects.XObject eval(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException - Throws:
TransformerException
-
createXPath
private org.apache.xpath.XPath createXPath(String str, org.apache.xml.utils.PrefixResolver prefixResolver) throws TransformerException - Throws:
TransformerException
-
fixupFunctionTable
private static void fixupFunctionTable()
-