| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>JSTLXPathImpl</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="JSTLXPathImpl"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathFactory.html" title="class in org.apache.taglibs.standard.tag.common.xml"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathNamespaceContext.html" title="class in org.apache.taglibs.standard.tag.common.xml"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../index.html?org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html" target="_top">Frames</a></li> |
| <li><a href="JSTLXPathImpl.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.taglibs.standard.tag.common.xml</div> |
| <h2 title="Class JSTLXPathImpl" class="title">Class JSTLXPathImpl</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.taglibs.standard.tag.common.xml.JSTLXPathImpl</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd>javax.xml.xpath.XPath</dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">JSTLXPathImpl</span> |
| extends java.lang.Object |
| implements javax.xml.xpath.XPath</pre> |
| <div class="block">The JSTLXPathImpl class provides implementation for the methods defined in |
| javax.xml.xpath.XPath interface. This provide simple access to the results |
| of an XPath expression. |
| |
| This class provides our own implementation of XPath, so that we can support |
| a generic Object type in returnType arguement for XPath's evaluate instance |
| method. |
| |
| Most of the implementation is exactly similar to what is already provided in |
| com.sun.org.apache.xpath.internal.jaxp.XPathImpl.java</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>javax.xml.xpath.XPathExpression</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#compile-java.lang.String-">compile</a></span>(java.lang.String expression)</code> |
| <div class="block">Compile an XPath expression for later evaluation.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#evaluate-java.lang.String-org.xml.sax.InputSource-">evaluate</a></span>(java.lang.String expression, |
| org.xml.sax.InputSource source)</code> |
| <div class="block">Evaluate an XPath expression in the context of the specified <code>InputSource</code> |
| and return the result as a <code>String</code>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>java.lang.Object</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#evaluate-java.lang.String-org.xml.sax.InputSource-javax.xml.namespace.QName-">evaluate</a></span>(java.lang.String expression, |
| org.xml.sax.InputSource source, |
| javax.xml.namespace.QName returnType)</code> |
| <div class="block">Evaluate an XPath expression in the context of the specified <code>InputSource</code> |
| and return the result as the specified type.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#evaluate-java.lang.String-java.lang.Object-">evaluate</a></span>(java.lang.String expression, |
| java.lang.Object item)</code> |
| <div class="block">Evaluate an XPath expression in the specified context and return the result as a <code>String</code>.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>java.lang.Object</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#evaluate-java.lang.String-java.lang.Object-javax.xml.namespace.QName-">evaluate</a></span>(java.lang.String expression, |
| java.lang.Object item, |
| javax.xml.namespace.QName returnType)</code> |
| <div class="block">Evaluate an <code>XPath</code> expression in the specified context and return the result as the specified type.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>javax.xml.namespace.NamespaceContext</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#getNamespaceContext--">getNamespaceContext</a></span>()</code> |
| <div class="block">Returns the current namespace context.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>javax.xml.xpath.XPathFunctionResolver</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#getXPathFunctionResolver--">getXPathFunctionResolver</a></span>()</code> |
| <div class="block">Returns the current function resolver.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>javax.xml.xpath.XPathVariableResolver</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#getXPathVariableResolver--">getXPathVariableResolver</a></span>()</code> |
| <div class="block">Returns the current variable resolver.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#reset--">reset</a></span>()</code> |
| <div class="block">Reset this <code>XPath</code> to its original configuration.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#setNamespaceContext-javax.xml.namespace.NamespaceContext-">setNamespaceContext</a></span>(javax.xml.namespace.NamespaceContext nsContext)</code> |
| <div class="block">Establishes a namespace context.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#setXPathFunctionResolver-javax.xml.xpath.XPathFunctionResolver-">setXPathFunctionResolver</a></span>(javax.xml.xpath.XPathFunctionResolver resolver)</code> |
| <div class="block">Establishes a function resolver.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#setXPathVariableResolver-javax.xml.xpath.XPathVariableResolver-">setXPathVariableResolver</a></span>(javax.xml.xpath.XPathVariableResolver resolver)</code> |
| <div class="block">Establishes a variable resolver.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setXPathVariableResolver-javax.xml.xpath.XPathVariableResolver-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setXPathVariableResolver</h4> |
| <pre>public void setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver resolver)</pre> |
| <div class="block"><p>Establishes a variable resolver.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>setXPathVariableResolver</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resolver</code> - Variable Resolver</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getXPathVariableResolver--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getXPathVariableResolver</h4> |
| <pre>public javax.xml.xpath.XPathVariableResolver getXPathVariableResolver()</pre> |
| <div class="block"><p>Returns the current variable resolver.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>getXPathVariableResolver</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Current variable resolver</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setXPathFunctionResolver-javax.xml.xpath.XPathFunctionResolver-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setXPathFunctionResolver</h4> |
| <pre>public void setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver resolver)</pre> |
| <div class="block"><p>Establishes a function resolver.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>setXPathFunctionResolver</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resolver</code> - XPath function resolver</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getXPathFunctionResolver--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getXPathFunctionResolver</h4> |
| <pre>public javax.xml.xpath.XPathFunctionResolver getXPathFunctionResolver()</pre> |
| <div class="block"><p>Returns the current function resolver.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>getXPathFunctionResolver</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Current function resolver</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setNamespaceContext-javax.xml.namespace.NamespaceContext-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setNamespaceContext</h4> |
| <pre>public void setNamespaceContext(javax.xml.namespace.NamespaceContext nsContext)</pre> |
| <div class="block"><p>Establishes a namespace context.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>setNamespaceContext</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>nsContext</code> - Namespace context to use</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNamespaceContext--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNamespaceContext</h4> |
| <pre>public javax.xml.namespace.NamespaceContext getNamespaceContext()</pre> |
| <div class="block"><p>Returns the current namespace context.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>getNamespaceContext</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Current Namespace context</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evaluate-java.lang.String-java.lang.Object-javax.xml.namespace.QName-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evaluate</h4> |
| <pre>public java.lang.Object evaluate(java.lang.String expression, |
| java.lang.Object item, |
| javax.xml.namespace.QName returnType) |
| throws javax.xml.xpath.XPathExpressionException</pre> |
| <div class="block"><p>Evaluate an <code>XPath</code> expression in the specified context and return the result as the specified type.</p> |
| |
| <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec |
| for context item evaluation, |
| variable, function and <code>QName</code> resolution and return type conversion.</p> |
| |
| <p>If <code>returnType</code> is not one of the types defined in <code>XPathConstants</code> ( |
| <code>NUMBER</code>, |
| <code>STRING</code>, |
| <code>BOOLEAN</code>, |
| <code>NODE</code> or |
| <code>NODESET</code>) |
| then an <code>IllegalArgumentException</code> is thrown.</p> |
| |
| <p>If a <code>null</code> value is provided for |
| <code>item</code>, an empty document will be used for the |
| context. |
| If <code>expression</code> or <code>returnType</code> is <code>null</code>, then a |
| <code>NullPointerException</code> is thrown.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>evaluate</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expression</code> - The XPath expression.</dd> |
| <dd><code>item</code> - The starting context (node or node list, for example).</dd> |
| <dd><code>returnType</code> - The desired return type.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Result of evaluating an XPath expression as an <code>Object</code> of <code>returnType</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.xml.xpath.XPathExpressionException</code> - If <code>expression</code> cannot be evaluated.</dd> |
| <dd><code>java.lang.IllegalArgumentException</code> - If <code>returnType</code> is not one of the types defined in <code>XPathConstants</code>.</dd> |
| <dd><code>java.lang.NullPointerException</code> - If <code>expression</code> or <code>returnType</code> is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evaluate-java.lang.String-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evaluate</h4> |
| <pre>public java.lang.String evaluate(java.lang.String expression, |
| java.lang.Object item) |
| throws javax.xml.xpath.XPathExpressionException</pre> |
| <div class="block"><p>Evaluate an XPath expression in the specified context and return the result as a <code>String</code>.</p> |
| |
| <p>This method calls <a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#evaluate-java.lang.String-java.lang.Object-javax.xml.namespace.QName-"><code>evaluate(String expression, Object item, QName returnType)</code></a> with a <code>returnType</code> of |
| <code>XPathConstants.STRING</code>.</p> |
| |
| <p>See "Evaluation of XPath Expressions" of JAXP 1.3 spec |
| for context item evaluation, |
| variable, function and QName resolution and return type conversion.</p> |
| |
| <p>If a <code>null</code> value is provided for |
| <code>item</code>, an empty document will be used for the |
| context. |
| If <code>expression</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>evaluate</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expression</code> - The XPath expression.</dd> |
| <dd><code>item</code> - The starting context (node or node list, for example).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The <code>String</code> that is the result of evaluating the expression and |
| converting the result to a <code>String</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.xml.xpath.XPathExpressionException</code> - If <code>expression</code> cannot be evaluated.</dd> |
| <dd><code>java.lang.NullPointerException</code> - If <code>expression</code> is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="compile-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compile</h4> |
| <pre>public javax.xml.xpath.XPathExpression compile(java.lang.String expression) |
| throws javax.xml.xpath.XPathExpressionException</pre> |
| <div class="block"><p>Compile an XPath expression for later evaluation.</p> |
| |
| <p>If <code>expression</code> contains any <code>XPathFunction</code>s, |
| they must be available via the <code>XPathFunctionResolver</code>. |
| An <code>XPathExpressionException</code> will be thrown if the <code>XPathFunction</code> |
| cannot be resovled with the <code>XPathFunctionResolver</code>.</p> |
| |
| <p>If <code>expression</code> is <code>null</code>, a <code>NullPointerException</code> is thrown.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>compile</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expression</code> - The XPath expression.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Compiled XPath expression.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.xml.xpath.XPathExpressionException</code> - If <code>expression</code> cannot be compiled.</dd> |
| <dd><code>java.lang.NullPointerException</code> - If <code>expression</code> is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evaluate-java.lang.String-org.xml.sax.InputSource-javax.xml.namespace.QName-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evaluate</h4> |
| <pre>public java.lang.Object evaluate(java.lang.String expression, |
| org.xml.sax.InputSource source, |
| javax.xml.namespace.QName returnType) |
| throws javax.xml.xpath.XPathExpressionException</pre> |
| <div class="block"><p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> |
| and return the result as the specified type.</p> |
| |
| <p>This method builds a data model for the <code>InputSource</code> and calls |
| <a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#evaluate-java.lang.String-java.lang.Object-javax.xml.namespace.QName-"><code>evaluate(String expression, Object item, QName returnType)</code></a> on the resulting document object.</p> |
| |
| <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec |
| for context item evaluation, |
| variable, function and QName resolution and return type conversion.</p> |
| |
| <p>If <code>returnType</code> is not one of the types defined in <code>XPathConstants</code>, |
| then an <code>IllegalArgumentException</code> is thrown.</p> |
| |
| <p>If <code>expression</code>, <code>source</code> or <code>returnType</code> is <code>null</code>, |
| then a <code>NullPointerException</code> is thrown.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>evaluate</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expression</code> - The XPath expression.</dd> |
| <dd><code>source</code> - The input source of the document to evaluate over.</dd> |
| <dd><code>returnType</code> - The desired return type.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The <code>Object</code> that encapsulates the result of evaluating the expression.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.xml.xpath.XPathExpressionException</code> - If expression cannot be evaluated.</dd> |
| <dd><code>java.lang.IllegalArgumentException</code> - If <code>returnType</code> is not one of the types defined in <code>XPathConstants</code>.</dd> |
| <dd><code>java.lang.NullPointerException</code> - If <code>expression</code>, <code>source</code> or <code>returnType</code> |
| is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="evaluate-java.lang.String-org.xml.sax.InputSource-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>evaluate</h4> |
| <pre>public java.lang.String evaluate(java.lang.String expression, |
| org.xml.sax.InputSource source) |
| throws javax.xml.xpath.XPathExpressionException</pre> |
| <div class="block"><p>Evaluate an XPath expression in the context of the specified <code>InputSource</code> |
| and return the result as a <code>String</code>.</p> |
| |
| <p>This method calls <a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html#evaluate-java.lang.String-org.xml.sax.InputSource-javax.xml.namespace.QName-"><code>evaluate(String expression, InputSource source, QName returnType)</code></a> with a |
| <code>returnType</code> of <code>XPathConstants.STRING</code>.</p> |
| |
| <p>See "Evaluation of XPath Expressions" section of JAXP 1.3 spec |
| for context item evaluation, |
| variable, function and QName resolution and return type conversion.</p> |
| |
| <p>If <code>expression</code> or <code>source</code> is <code>null</code>, |
| then a <code>NullPointerException</code> is thrown.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>evaluate</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>expression</code> - The XPath expression.</dd> |
| <dd><code>source</code> - The <code>InputSource</code> of the document to evaluate over.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The <code>String</code> that is the result of evaluating the expression and |
| converting the result to a <code>String</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.xml.xpath.XPathExpressionException</code> - If expression cannot be evaluated.</dd> |
| <dd><code>java.lang.NullPointerException</code> - If <code>expression</code> or <code>source</code> is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="reset--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>reset</h4> |
| <pre>public void reset()</pre> |
| <div class="block"><p>Reset this <code>XPath</code> to its original configuration.</p> |
| |
| <p><code>XPath</code> is reset to the same state as when it was created with |
| <code>XPathFactory#newXPath()</code>. |
| <code>reset()</code> is designed to allow the reuse of existing <code>XPath</code>s |
| thus saving resources associated with the creation of new <code>XPath</code>s.</p> |
| |
| <p>The reset <code>XPath</code> is not guaranteed to have the same |
| <code>XPathFunctionResolver</code>, <code>XPathVariableResolver</code> |
| or <code>NamespaceContext</code> <code>Object</code>s, e.g. <code>Object.equals(Object obj)</code>. |
| It is guaranteed to have a functionally equal <code>XPathFunctionResolver</code>, |
| <code>XPathVariableResolver</code> |
| and <code>NamespaceContext</code>.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>reset</code> in interface <code>javax.xml.xpath.XPath</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathFactory.html" title="class in org.apache.taglibs.standard.tag.common.xml"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../../org/apache/taglibs/standard/tag/common/xml/JSTLXPathNamespaceContext.html" title="class in org.apache.taglibs.standard.tag.common.xml"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../index.html?org/apache/taglibs/standard/tag/common/xml/JSTLXPathImpl.html" target="_top">Frames</a></li> |
| <li><a href="JSTLXPathImpl.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |