source: icXML/icXML-devel/src/xercesc/dom/DOMXPathNSResolver.hpp @ 6297

Last change on this file since 6297 was 2722, checked in by cameron, 7 years ago

Original Xerces files with import mods for icxercesc

File size: 4.6 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: DOMXPathNSResolver.hpp 698579 2008-09-24 14:13:08Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMXPATHNSRESOLVER_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMXPATHNSRESOLVER_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28/**
29 * The <code>DOMXPathNSResolver</code> interface permit prefix strings
30 * in the expression to be properly bound to namespaceURI strings.
31 * <code>DOMXPathEvaluator</code> can construct an implementation of
32 * <code>DOMXPathNSResolver</code> from a node, or the interface may be
33 * implemented by any application.
34 * @since DOM Level 3
35 */
36class CDOM_EXPORT DOMXPathNSResolver
37{
38
39protected:
40    // -----------------------------------------------------------------------
41    //  Hidden constructors
42    // -----------------------------------------------------------------------
43    /** @name Hidden constructors */
44    //@{
45    DOMXPathNSResolver() {};
46    //@}
47
48private:
49    // -----------------------------------------------------------------------
50    // Unimplemented constructors and operators
51    // -----------------------------------------------------------------------
52    /** @name Unimplemented constructors and operators */
53    //@{
54    DOMXPathNSResolver(const DOMXPathNSResolver &);
55    DOMXPathNSResolver& operator = (const  DOMXPathNSResolver&);
56    //@}
57
58public:
59    // -----------------------------------------------------------------------
60    //  All constructors are hidden, just the destructor is available
61    // -----------------------------------------------------------------------
62    /** @name Destructor */
63    //@{
64    /**
65     * Destructor
66     *
67     */
68    virtual ~DOMXPathNSResolver() {};
69    //@}
70
71    // -----------------------------------------------------------------------
72    // Virtual DOMDocument interface
73    // -----------------------------------------------------------------------
74    /** @name Functions introduced in DOM Level 3 */
75    //@{
76
77    /** Look up the namespace URI associated to the given namespace prefix.
78     *
79     * @param prefix of type XMLCh - The prefix to look for. An empty or
80     * null string denotes the default namespace.
81     * @return the associated namespace URI or null if none is found.
82     */
83    virtual const XMLCh*          lookupNamespaceURI(const XMLCh* prefix) const = 0;
84    //@}
85
86
87    // -----------------------------------------------------------------------
88    // Non-standard extension
89    // -----------------------------------------------------------------------
90    /** @name Non-standard extension */
91    //@{
92
93    /**
94     * Non-standard extension
95     *
96     * XPath2 implementations require a reverse lookup in the static context.
97     * Look up the prefix associated with the namespace URI
98     * @param URI of type XMLCh - The namespace to look for.
99     * @return the associated prefix which can be an empty string if this
100     * is a default namespace or null if none is found.
101     */
102    virtual const XMLCh*          lookupPrefix(const XMLCh* URI) const = 0;
103
104    /**
105     * Non-standard extension
106     *
107     * Associate the given namespace prefix to the namespace URI.
108     * @param prefix of type XMLCh - The namespace prefix to bind. An empty
109     * or null string denotes the default namespace.
110     * @param uri of type XMLCh - The associated namespace URI. If this
111     * argument is null or an empty string then the existing binding for this
112     * prefix is removed.
113     */
114    virtual void addNamespaceBinding(const XMLCh* prefix, const XMLCh* uri) = 0;
115
116    /**
117     * Called to indicate that this object (and its associated children) is no longer in use
118     * and that the implementation may relinquish any resources associated with it and
119     * its associated children.
120     *
121     * Access to a released object will lead to unexpected result.
122     */
123    virtual void release() = 0;
124
125    //@}
126};
127
128XERCES_CPP_NAMESPACE_END
129
130#endif
Note: See TracBrowser for help on using the repository browser.