01: /*
02: * Copyright 2002-2005 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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$
18: */
19:
20: package org.apache.xpath.domapi;
21:
22: import org.apache.xml.utils.PrefixResolverDefault;
23: import org.w3c.dom.Node;
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
43: XPathNSResolver {
44:
45: /**
46: * Constructor for XPathNSResolverImpl.
47: * @param xpathExpressionContext
48: */
49: public XPathNSResolverImpl(Node xpathExpressionContext) {
50: super (xpathExpressionContext);
51: }
52:
53: /**
54: * @see org.w3c.dom.xpath.XPathNSResolver#lookupNamespaceURI(String)
55: */
56: public String lookupNamespaceURI(String prefix) {
57: return super.getNamespaceForPrefix(prefix);
58: }
59:
60: }
|