blob: dfe204b0d956d14a4385158407237191d6c32b29 [file] [log] [blame]
<html>
<body>
<p>
<font size="+1"><strong>Package org.eclipse.wst.xml.xpath.core</strong></font>
</p>
<hr>
<h2>
<font size="-1"><strong>org.eclipse.wst.xml.xpath.core</strong></font>
<br>
Class XPathCorePlugin</h2>
<br>
<hr>
<pre>public class <strong>XPathCorePlugin</strong>
extends Plugin</pre>The activator class controls the plug-in life cycle<hr>
<table width="100%" border="1">
<tr cols="2" bgcolor="#CCCCFF">
<td colspan="2" width="100%">
<h2>Field Summary</h2>
</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>public static java.lang.String</code></td><td width="80%" align="left"><code>PLUGIN_ID</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
<br>
<table width="100%" border="1">
<tr bgcolor="#CCCCFF">
<td width="100%">
<h2>Constructor Summary</h2>
</td>
</tr>
<tr>
<td><code><strong>XPathCorePlugin</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 org.eclipse.wst.xml.xpath.core.XPathCorePlugin</code></td><td width="" align="left"><code>getDefault()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
Returns the shared instance</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>public void</code></td><td width="" align="left"><code>start(BundleContext context)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>public void</code></td><td width="" align="left"><code>stop(BundleContext context)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
<hr>
<table cols="2" width="100%" border="1">
<tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left">
<td>
<h2>
Field Detail
</h2>
</td>
</tr>
</table>
<h2>PLUGIN_ID</h2>
<p>
<code>public static java.lang.String <strong>PLUGIN_ID</strong></code>
</p>
<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>XPathCorePlugin</h2>
<p>
<code>public <strong>XPathCorePlugin</strong>()</code>
</p>
<p>The constructor</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>getDefault</h2>
<p>
<code>public org.eclipse.wst.xml.xpath.core.XPathCorePlugin <strong>getDefault</strong>()</code>
</p>
<p>Returns the shared instance</p>
<h3>Returns</h3>
<p>
<code>org.eclipse.wst.xml.xpath.core.XPathCorePlugin</code> - the shared instance</p>
<hr>
<h2>start</h2>
<p>
<code>public void <strong>start</strong>(BundleContext context)</code>
</p>
<p></p>
<h3>Parameters</h3>
<p>
<code>context</code>
</p>
<h3>Throws:</h3>
<p>
<code>java.lang.Exception</code>
</p>
<hr>
<h2>stop</h2>
<p>
<code>public void <strong>stop</strong>(BundleContext context)</code>
</p>
<p></p>
<h3>Parameters</h3>
<p>
<code>context</code>
</p>
<h3>Throws:</h3>
<p>
<code>java.lang.Exception</code>
</p>
<hr>
<p>
<font size="+1"><strong>Package org.eclipse.wst.xml.xpath.core.internal.parser</strong></font>
</p>
<hr>
<h2>
<font size="-1"><strong>org.eclipse.wst.xml.xpath.core.internal.parser</strong></font>
<br>
Class XPathParser</h2>
<br>
<hr>
<pre>public class <strong>XPathParser</strong>
extends java.lang.Object</pre>
<hr>
<table width="100%" border="1">
<tr cols="2" bgcolor="#CCCCFF">
<td colspan="2" width="100%">
<h2>Field Summary</h2>
</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>protected Token</code></td><td width="80%" align="left"><code>currentToken</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>protected org.apache.commons.jxpath.ri.parser.XPathParser</code></td><td width="80%" align="left"><code>parser</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>protected Token</code></td><td width="80%" align="left"><code>previousToken</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
</table>
<br>
<table width="100%" border="1">
<tr bgcolor="#CCCCFF">
<td width="100%">
<h2>Constructor Summary</h2>
</td>
</tr>
<tr>
<td><code><strong>XPathParser</strong>(java.lang.String xpath)</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 Token</code></td><td width="" align="left"><code>getCurrentToken()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>public Token</code></td><td width="" align="left"><code>getPreviousToken()</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>public int</code></td><td width="" align="left"><code>getTokenStartOffset(int offsetLine
,
int offsetColumn)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
Given a line number and a column number, return the starting
offset of the last known token.</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>protected boolean</code></td><td width="" align="left"><code>locatedColumn(Token token
,
int offsetColumn)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
Checks to see if the token is in the range of the column offset</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>protected boolean</code></td><td width="" align="left"><code>locatedLine(Token token
,
int offsetLine)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
Checks to see if the token is in the range of the line offset</td>
</tr>
</table>
<hr>
<table cols="2" width="100%" border="1">
<tr colspan="2" width="100%" bgcolor="#CCCCFF" align="left">
<td>
<h2>
Field Detail
</h2>
</td>
</tr>
</table>
<h2>currentToken</h2>
<p>
<code>protected Token <strong>currentToken</strong></code>
</p>
<hr>
<h2>parser</h2>
<p>
<code>protected org.apache.commons.jxpath.ri.parser.XPathParser <strong>parser</strong></code>
</p>
<hr>
<h2>previousToken</h2>
<p>
<code>protected Token <strong>previousToken</strong></code>
</p>
<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>XPathParser</h2>
<p>
<code>public <strong>XPathParser</strong>(java.lang.String xpath)</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>getCurrentToken</h2>
<p>
<code>public Token <strong>getCurrentToken</strong>()</code>
</p>
<p></p>
<h3>Returns</h3>
<p>
<code>Token</code>
</p>
<hr>
<h2>getPreviousToken</h2>
<p>
<code>public Token <strong>getPreviousToken</strong>()</code>
</p>
<p></p>
<h3>Returns</h3>
<p>
<code>Token</code>
</p>
<hr>
<h2>getTokenStartOffset</h2>
<p>
<code>public int <strong>getTokenStartOffset</strong>(int offsetLine
,
int offsetColumn)</code>
</p>
<p>Given a line number and a column number, return the starting
offset of the last known token.</p>
<h3>Parameters</h3>
<p>
<code>offsetLine</code>
</p>
<p>
<code>offsetColumn</code>
</p>
<h3>Returns</h3>
<p>
<code>int</code>
</p>
<hr>
<h2>locatedColumn</h2>
<p>
<code>protected boolean <strong>locatedColumn</strong>(Token token
,
int offsetColumn)</code>
</p>
<p>Checks to see if the token is in the range of the column offset</p>
<h3>Parameters</h3>
<p>
<code>token</code>
</p>
<p>
<code>offsetColumn</code>
</p>
<h3>Returns</h3>
<p>
<code>boolean</code> - true if found, false otherwise</p>
<hr>
<h2>locatedLine</h2>
<p>
<code>protected boolean <strong>locatedLine</strong>(Token token
,
int offsetLine)</code>
</p>
<p>Checks to see if the token is in the range of the line offset</p>
<h3>Parameters</h3>
<p>
<code>token</code> - An XPath Token.</p>
<p>
<code>offsetLine</code> - Line number offset of a region.</p>
<h3>Returns</h3>
<p>
<code>boolean</code> - true if found, false otherwise.</p>
<hr>
<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>XSLTXPathHelper</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>compile(java.lang.String expression)</code>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr valign="top">
<td width="20%" align="right"><code>public static org.apache.xpath.objects.XObject</code></td><td width="" align="left"><code>eval(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 org.apache.xpath.objects.XObject</code></td><td width="" align="left"><code>eval(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 org.apache.xpath.objects.XObject</code></td><td width="" align="left"><code>eval(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.apache.xml.utils.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 org.apache.xpath.compiler.FunctionTable</code></td><td width="" align="left"><code>getFunctionTable()</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>selectNodeIterator(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>selectNodeIterator(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>selectNodeList(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>selectNodeList(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>selectSingleNode(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>selectSingleNode(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>XSLTXPathHelper</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>compile</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>eval</h2>
<p>
<code>public org.apache.xpath.objects.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>org.apache.xpath.objects.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>eval</h2>
<p>
<code>public org.apache.xpath.objects.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>org.apache.xpath.objects.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>eval</h2>
<p>
<code>public org.apache.xpath.objects.XObject <strong>eval</strong>(org.w3c.dom.Node contextNode
,
java.lang.String str
,
org.apache.xml.utils.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>org.apache.xpath.objects.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>getFunctionTable</h2>
<p>
<code>protected org.apache.xpath.compiler.FunctionTable <strong>getFunctionTable</strong>()</code>
</p>
<p></p>
<h3>Returns</h3>
<p>
<code>org.apache.xpath.compiler.FunctionTable</code>
</p>
<hr>
<h2>selectNodeIterator</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>selectNodeIterator</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>selectNodeList</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>selectNodeList</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>selectSingleNode</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>selectSingleNode</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>