Source for org.w3c.dom.xpath.XPathNSResolver

   1: /*
   2:  * Copyright (c) 2004 World Wide Web Consortium,
   3:  *
   4:  * (Massachusetts Institute of Technology, European Research Consortium for
   5:  * Informatics and Mathematics, Keio University). All Rights Reserved. This
   6:  * work is distributed under the W3C(r) Software License [1] in the hope that
   7:  * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
   8:  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   9:  *
  10:  * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
  11:  */
  12: 
  13: package org.w3c.dom.xpath;
  14: 
  15: /**
  16:  * The <code>XPathNSResolver</code> interface permit <code>prefix</code> 
  17:  * strings in the expression to be properly bound to 
  18:  * <code>namespaceURI</code> strings. <code>XPathEvaluator</code> can 
  19:  * construct an implementation of <code>XPathNSResolver</code> from a node, 
  20:  * or the interface may be implemented by any application.
  21:  * <p>See also the <a href='http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226'>Document Object Model (DOM) Level 3 XPath Specification</a>.
  22:  */
  23: public interface XPathNSResolver {
  24:     /**
  25:      * Look up the namespace URI associated to the given namespace prefix. The 
  26:      * XPath evaluator must never call this with a <code>null</code> or 
  27:      * empty argument, because the result of doing this is undefined.
  28:      * @param prefix The prefix to look for.
  29:      * @return Returns the associated namespace URI or <code>null</code> if 
  30:      *   none is found.
  31:      */
  32:     public String lookupNamespaceURI(String prefix);
  33: 
  34: }