Package net.sf.jasperreports.xalan.util
Class XalanNsAwareXPathExecuter
java.lang.Object
net.sf.jasperreports.xalan.util.XalanXPathExecuter
net.sf.jasperreports.xalan.util.XalanNsAwareXPathExecuter
- All Implemented Interfaces:
JRXPathExecuter
XPath executer implementation that uses Apache Xalan.
- Author:
- Narcis Marcu (narcism@users.sourceforge.net)
-
Field Summary
Fields inherited from class net.sf.jasperreports.xalan.util.XalanXPathExecuter
EXCEPTION_MESSAGE_KEY_XPATH_SELECTION_FAILURE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancontainsPrefixes(String expression) protected voidcreateNamespaceElement(Node contextNode, String expression) extractXmlNamespaces(Node contextNode) booleanselectNodeList(Node contextNode, String expression) Selects a node list by evaluating an XPath expression on a context node.selectObject(Node contextNode, String expression) Selects an object by evaluating an XPath expression on a context node.voidsetDetectXmlNamespaces(boolean detectXmlNamespaces) voidsetXmlNamespaceMap(Map<String, String> xmlNamespaceMap)
-
Constructor Details
-
XalanNsAwareXPathExecuter
public XalanNsAwareXPathExecuter()Default constructor.
-
-
Method Details
-
getXmlNamespaceMap
-
setXmlNamespaceMap
- Throws:
JRException
-
getDetectXmlNamespaces
public boolean getDetectXmlNamespaces() -
setDetectXmlNamespaces
public void setDetectXmlNamespaces(boolean detectXmlNamespaces) -
createNamespaceElement
- Throws:
JRException
-
selectNodeList
Description copied from interface:JRXPathExecuterSelects a node list by evaluating an XPath expression on a context node.- Specified by:
selectNodeListin interfaceJRXPathExecuter- Overrides:
selectNodeListin classXalanXPathExecuter- Parameters:
contextNode- the context node (a document can also be used)expression- the XPath expression- Returns:
- the selected node list
- Throws:
JRException- if the XPath evaluation failed
-
selectObject
Description copied from interface:JRXPathExecuterSelects an object by evaluating an XPath expression on a context node. If the expression evaluates to a node list, the first node in the list should be returned. Otherwise, the primitive value resulted from the evaluation should be returned as ajava.lang.String,java.lang.Numberorjava.lang.Boolean.- Specified by:
selectObjectin interfaceJRXPathExecuter- Overrides:
selectObjectin classXalanXPathExecuter- Parameters:
contextNode- the context node (a document can also be used)expression- the XPath expression- Returns:
- the selected node or value
- Throws:
JRException- if the XPath evaluation failed
-
containsPrefixes
-
extractXmlNamespaces
- Throws:
JRException
-