source: NonGTP/Xerces/xerces/include/xercesc/dom/DOMXPathNSResolver.hpp @ 358

Revision 358, 3.8 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1#ifndef DOMXPathNSResolver_HEADER_GUARD_
2#define DOMXPathNSResolver_HEADER_GUARD_
3
4/*
5 * Copyright 2001-2004 The Apache Software Foundation.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *      http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#include <xercesc/util/XercesDefs.hpp>
21
22XERCES_CPP_NAMESPACE_BEGIN
23/**
24 * The <code>DOMXPathNSResolver</code> interface permit prefix strings
25 * in the expression to be properly bound to namespaceURI strings.
26 * <code>DOMXPathEvaluator</code> can construct an implementation of
27 * <code>DOMXPathNSResolver</code> from a node, or the interface may be
28 * implemented by any application.
29 * @since DOM Level 3
30 */
31class CDOM_EXPORT DOMXPathNSResolver
32{
33
34protected:
35    // -----------------------------------------------------------------------
36    //  Hidden constructors
37    // -----------------------------------------------------------------------
38    /** @name Hidden constructors */
39    //@{   
40    DOMXPathNSResolver() {};
41    //@}
42
43private:
44    // -----------------------------------------------------------------------
45    // Unimplemented constructors and operators
46    // -----------------------------------------------------------------------
47    /** @name Unimplemented constructors and operators */
48    //@{
49    DOMXPathNSResolver(const DOMXPathNSResolver &);
50    DOMXPathNSResolver& operator = (const  DOMXPathNSResolver&);
51    //@}
52
53public:
54    // -----------------------------------------------------------------------
55    //  All constructors are hidden, just the destructor is available
56    // -----------------------------------------------------------------------
57    /** @name Destructor */
58    //@{
59    /**
60     * Destructor
61     *
62     */
63    virtual ~DOMXPathNSResolver() {};
64    //@}
65
66    // -----------------------------------------------------------------------
67    // Virtual DOMDocument interface
68    // -----------------------------------------------------------------------
69    /** @name Functions introduced in DOM Level 3 */
70    //@{
71
72    /** Look up the namespace URI associated to the given namespace prefix.
73     * The XPath evaluator must never call this with a null or empty argument,
74     * because the result of doing this is undefined.
75     * @param prefix of type XMLCh - The prefix to look for.
76     * @return the associated namespace URI or null if none is found.
77     */
78    virtual const XMLCh*          lookupNamespaceURI(const XMLCh* prefix) const = 0;
79    //@}
80
81
82    // -----------------------------------------------------------------------
83    // Non-standard extension
84    // -----------------------------------------------------------------------
85    /** @name Non-standard extension */
86    //@{
87
88    /**
89     * Non-standard extension
90     *
91     * XPath2 implementations require a reverse lookup in the static context.
92     * Look up the prefix associated with the namespace URI
93     * The XPath evaluator must never call this with a null or empty argument,
94     * because the result of doing this is undefined.
95     * @param URI of type XMLCh - The namespace to look for.
96     * @return the associated prefix or null if none is found.
97     */
98    virtual const XMLCh*          lookupPrefix(const XMLCh* URI) const = 0;
99
100
101    //@}
102};
103
104XERCES_CPP_NAMESPACE_END
105
106#endif
107
Note: See TracBrowser for help on using the repository browser.