KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xpath > internal > domapi > XPathNSResolverImpl


1 /*
2  * Copyright 2002-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /*
17  * $Id: XPathNSResolverImpl.java,v 1.2.4.1 2005/09/10 04:13:19 jeffsuttor Exp $
18  */

19
20 package com.sun.org.apache.xpath.internal.domapi;
21
22 import com.sun.org.apache.xml.internal.utils.PrefixResolverDefault;
23 import org.w3c.dom.Node JavaDoc;
24 import org.w3c.dom.xpath.XPathNSResolver;
25
26 /**
27  *
28  * The class provides an implementation XPathNSResolver according
29  * to the DOM L3 XPath Specification, Working Group Note 26 February 2004.
30  *
31  * <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>.</p>
32  *
33  * <p>The <code>XPathNSResolver</code> interface permit <code>prefix</code>
34  * strings in the expression to be properly bound to
35  * <code>namespaceURI</code> strings. <code>XPathEvaluator</code> can
36  * construct an implementation of <code>XPathNSResolver</code> from a node,
37  * or the interface may be implemented by any application.</p>
38  *
39  * @see org.w3c.dom.xpath.XPathNSResolver
40  * @xsl.usage internal
41  */

42 class XPathNSResolverImpl extends PrefixResolverDefault implements XPathNSResolver {
43
44     /**
45      * Constructor for XPathNSResolverImpl.
46      * @param xpathExpressionContext
47      */

48     public XPathNSResolverImpl(Node JavaDoc xpathExpressionContext) {
49         super(xpathExpressionContext);
50     }
51
52     /**
53      * @see org.w3c.dom.xpath.XPathNSResolver#lookupNamespaceURI(String)
54      */

55     public String JavaDoc lookupNamespaceURI(String JavaDoc prefix) {
56         return super.getNamespaceForPrefix(prefix);
57     }
58
59 }
60
Popular Tags