blob: 548a7c7baf28c3c05fa3e9ad86f0a6e5b1bf50f6 [file] [log] [blame]
<html><body><p><font size="+1"><strong>Package org.eclipse.wst.xml.xpath.core.util</strong></font></p><hr><h2><font size="-1"><strong>org.eclipse.wst.xml.xpath.core.util</strong></font><br>
Class XSLTXPathHelper</h2><br><hr><pre>public class <strong>XSLTXPathHelper</strong>
extends java.lang.Object</pre><hr><table width="100%" border="1"><tr bgcolor="#CCCCFF"><td width="100%"><h2>Constructor Summary</h2></td></tr><tr><td><code><strong><a href="#con_XSLTXPathHelper">XSLTXPathHelper</a></strong>()</code></td></tr></table><br><table width="100%" border="1"><tr cols="2" bgcolor="#CCCCFF"><td colspan="2" width="100%"><h2>Method Summary</h2></td></tr><tr valign="top"><td width="20%" align="right"><code>public static void</code></td><td width="" align="left"><code><a href="#method_compile">compile</a>(java.lang.String expression)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr><tr valign="top"><td width="20%" align="right"><code>public static XObject</code></td><td width="" align="left"><code><a href="#method_eval">eval</a>(org.w3c.dom.Node contextNode
,
java.lang.String str)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Evaluate XPath string to an XObject. Using this method, XPath namespace
prefixes will be resolved from the namespaceNode.</td></tr><tr valign="top"><td width="20%" align="right"><code>public static XObject</code></td><td width="" align="left"><code><a href="#method_eval">eval</a>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.w3c.dom.Node namespaceNode)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Evaluate XPath string to an XObject. XPath namespace prefixes are
resolved from the namespaceNode. The implementation of this is a little
slow, since it creates a number of objects each time it is called. This
could be optimized to keep the same objects around, but then
thread-safety issues would arise.</td></tr><tr valign="top"><td width="20%" align="right"><code>public static XObject</code></td><td width="" align="left"><code><a href="#method_eval">eval</a>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
PrefixResolver prefixResolver)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Evaluate XPath string to an XObject. XPath namespace prefixes are
resolved from the namespaceNode. The implementation of this is a little
slow, since it creates a number of objects each time it is called. This
could be optimized to keep the same objects around, but then
thread-safety issues would arise.</td></tr><tr valign="top"><td width="20%" align="right"><code>protected static FunctionTable</code></td><td width="" align="left"><code><a href="#method_getFunctionTable">getFunctionTable</a>()</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.w3c.dom.traversal.NodeIterator</code></td><td width="" align="left"><code><a href="#method_selectNodeIterator">selectNodeIterator</a>(org.w3c.dom.Node contextNode
,
java.lang.String str)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Use an XPath string to select a nodelist. XPath namespace prefixes are
resolved from the contextNode.</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.w3c.dom.traversal.NodeIterator</code></td><td width="" align="left"><code><a href="#method_selectNodeIterator">selectNodeIterator</a>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.w3c.dom.Node namespaceNode)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Use an XPath string to select a nodelist. XPath namespace prefixes are
resolved from the namespaceNode.</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.w3c.dom.NodeList</code></td><td width="" align="left"><code><a href="#method_selectNodeList">selectNodeList</a>(org.w3c.dom.Node contextNode
,
java.lang.String str)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Use an XPath string to select a nodelist. XPath namespace prefixes are
resolved from the contextNode.</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.w3c.dom.NodeList</code></td><td width="" align="left"><code><a href="#method_selectNodeList">selectNodeList</a>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.w3c.dom.Node namespaceNode)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Use an XPath string to select a nodelist. XPath namespace prefixes are
resolved from the namespaceNode.</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.w3c.dom.Node</code></td><td width="" align="left"><code><a href="#method_selectSingleNode">selectSingleNode</a>(org.w3c.dom.Node contextNode
,
java.lang.String str)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Use an XPath string to select a single node. XPath namespace prefixes are
resolved from the context node, which may not be what you want (see the
next method).</td></tr><tr valign="top"><td width="20%" align="right"><code>public static org.w3c.dom.Node</code></td><td width="" align="left"><code><a href="#method_selectSingleNode">selectSingleNode</a>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.w3c.dom.Node namespaceNode)</code><br>
&nbsp;&nbsp;&nbsp;&nbsp;
Use an XPath string to select a single node. XPath namespace prefixes are
resolved from the namespaceNode.</td></tr></table><hr><table cols="2" width="100%" border="1"><tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left"><td><h2>
Constructor Detail
</h2></td></tr></table><h2><a name="con_XSLTXPathHelper">XSLTXPathHelper</a></h2><p><code>public <strong>XSLTXPathHelper</strong>()</code></p><p></p><hr><table cols="2" width="100%" border="1"><tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left"><td><h2>
Methods Detail
</h2></td></tr></table><h2><a name="method_compile">compile</a></h2><p><code>public void <strong>compile</strong>(java.lang.String expression)</code></p><p></p><h3>Parameters</h3><p><code>expression</code></p><h3>Throws:</h3><p><code>javax.xml.xpath.XPathExpressionException</code></p><hr><h2><a name="method_eval">eval</a></h2><p><code>public XObject <strong>eval</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str)</code></p><p>Evaluate XPath string to an XObject. Using this method, XPath namespace
prefixes will be resolved from the namespaceNode.</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><h3>Returns</h3><p><code>XObject</code> - An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr><h2><a name="method_eval">eval</a></h2><p><code>public XObject <strong>eval</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.w3c.dom.Node namespaceNode)</code></p><p>Evaluate XPath string to an XObject. XPath namespace prefixes are
resolved from the namespaceNode. The implementation of this is a little
slow, since it creates a number of objects each time it is called. This
could be optimized to keep the same objects around, but then
thread-safety issues would arise.</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><p><code>namespaceNode</code> - The node from which prefixes in the XPath will be resolved to namespaces.</p><h3>Returns</h3><p><code>XObject</code> - An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr><h2><a name="method_eval">eval</a></h2><p><code>public XObject <strong>eval</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
PrefixResolver prefixResolver)</code></p><p>Evaluate XPath string to an XObject. XPath namespace prefixes are
resolved from the namespaceNode. The implementation of this is a little
slow, since it creates a number of objects each time it is called. This
could be optimized to keep the same objects around, but then
thread-safety issues would arise.</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><p><code>prefixResolver</code> - Will be called if the parser encounters namespace prefixes, to resolve the prefixes to URLs.</p><h3>Returns</h3><p><code>XObject</code> - An XObject, which can be used to obtain a string, number, nodelist, etc, should never be null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr><h2><a name="method_getFunctionTable">getFunctionTable</a></h2><p><code>protected FunctionTable <strong>getFunctionTable</strong>()</code></p><p></p><h3>Returns</h3><p><code>FunctionTable</code></p><hr><h2><a name="method_selectNodeIterator">selectNodeIterator</a></h2><p><code>public org.w3c.dom.traversal.NodeIterator <strong>selectNodeIterator</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str)</code></p><p>Use an XPath string to select a nodelist. XPath namespace prefixes are
resolved from the contextNode.</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><h3>Returns</h3><p><code>org.w3c.dom.traversal.NodeIterator</code> - A NodeIterator, should never be null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr><h2><a name="method_selectNodeIterator">selectNodeIterator</a></h2><p><code>public org.w3c.dom.traversal.NodeIterator <strong>selectNodeIterator</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.w3c.dom.Node namespaceNode)</code></p><p>Use an XPath string to select a nodelist. XPath namespace prefixes are
resolved from the namespaceNode.</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><p><code>namespaceNode</code> - The node from which prefixes in the XPath will be resolved to namespaces.</p><h3>Returns</h3><p><code>org.w3c.dom.traversal.NodeIterator</code> - A NodeIterator, should never be null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr><h2><a name="method_selectNodeList">selectNodeList</a></h2><p><code>public org.w3c.dom.NodeList <strong>selectNodeList</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str)</code></p><p>Use an XPath string to select a nodelist. XPath namespace prefixes are
resolved from the contextNode.</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><h3>Returns</h3><p><code>org.w3c.dom.NodeList</code> - A NodeIterator, should never be null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr><h2><a name="method_selectNodeList">selectNodeList</a></h2><p><code>public org.w3c.dom.NodeList <strong>selectNodeList</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.w3c.dom.Node namespaceNode)</code></p><p>Use an XPath string to select a nodelist. XPath namespace prefixes are
resolved from the namespaceNode.</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><p><code>namespaceNode</code> - The node from which prefixes in the XPath will be resolved to namespaces.</p><h3>Returns</h3><p><code>org.w3c.dom.NodeList</code> - A NodeIterator, should never be null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr><h2><a name="method_selectSingleNode">selectSingleNode</a></h2><p><code>public org.w3c.dom.Node <strong>selectSingleNode</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str)</code></p><p>Use an XPath string to select a single node. XPath namespace prefixes are
resolved from the context node, which may not be what you want (see the
next method).</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><h3>Returns</h3><p><code>org.w3c.dom.Node</code> - The first node found that matches the XPath, or null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr><h2><a name="method_selectSingleNode">selectSingleNode</a></h2><p><code>public org.w3c.dom.Node <strong>selectSingleNode</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.w3c.dom.Node namespaceNode)</code></p><p>Use an XPath string to select a single node. XPath namespace prefixes are
resolved from the namespaceNode.</p><h3>Parameters</h3><p><code>contextNode</code> - The node to start searching from.</p><p><code>str</code> - A valid XPath string.</p><p><code>namespaceNode</code> - The node from which prefixes in the XPath will be resolved to namespaces.</p><h3>Returns</h3><p><code>org.w3c.dom.Node</code> - The first node found that matches the XPath, or null.</p><h3>Throws:</h3><p><code>javax.xml.transform.TransformerException</code></p><hr></body></html>