KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > dom > xpath > XPathNSResolver


1 /*
2  * Copyright (c) 2002 World Wide Web Consortium,
3  * (Massachusetts Institute of Technology, Institut National de
4  * Recherche en Informatique et en Automatique, Keio University). All
5  * Rights Reserved. This program is distributed under the W3C's Software
6  * Intellectual Property License. This program is distributed in the
7  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  * PURPOSE.
10  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11  */

12
13 package org.w3c.dom.xpath;
14
15
16 /**
17  * The <code>XPathNSResolver</code> interface permit <code>prefix</code>
18  * strings in the expression to be properly bound to
19  * <code>namespaceURI</code> strings. <code>XPathEvaluator</code> can
20  * construct an implementation of <code>XPathNSResolver</code> from a node,
21  * or the interface may be implemented by any application.
22  * <p>See also the <a HREF='http://www.w3.org/2002/08/WD-DOM-Level-3-XPath-20020820'>Document Object Model (DOM) Level 3 XPath Specification</a>.
23  */

24 public interface XPathNSResolver {
25     /**
26      * Look up the namespace URI associated to the given namespace prefix. The
27      * XPath evaluator must never call this with a <code>null</code> or
28      * empty argument, because the result of doing this is undefined.
29      * @param prefix The prefix to look for.
30      * @return Returns the associated namespace URI or <code>null</code> if
31      * none is found.
32      */

33     public String JavaDoc lookupNamespaceURI(String JavaDoc prefix);
34
35 }
36
Popular Tags