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

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

xerces added

Line 
1#ifndef DOMXPathNamespace_HEADER_GUARD_
2#define DOMXPathNamespace_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/dom/DOMNode.hpp>
21
22XERCES_CPP_NAMESPACE_BEGIN
23
24class DOMElement;
25
26/**
27 * The <code>DOMXPathNamespace</code> interface is returned by <code>DOMXPathResult</code>
28 * interfaces to represent the XPath namespace node type that DOM lacks. There is no
29 * public constructor for this node type. Attempts to place it into a hierarchy or a
30 * NamedNodeMap result in a DOMException with the code HIERARCHY_REQUEST_ERR. This node
31 * is read only, so methods or setting of attributes that would mutate the node result
32 * in a <code>DOMException</code> with the code NO_MODIFICATION_ALLOWED_ERR.
33 * The core specification describes attributes of the <code>DOMNode</code> interface that
34 * are different for different node types but does not describe XPATH_NAMESPACE_NODE,
35 * so here is a description of those attributes for this node type. All attributes of
36 * <code>DOMNode</code> not described in this section have a null or false value.
37 * ownerDocument matches the ownerDocument of the ownerElement even if the element is later adopted.
38 * nodeName is always the string "#namespace".
39 * prefix is the prefix of the namespace represented by the node.
40 * localName is the same as prefix.
41 * nodeType is equal to XPATH_NAMESPACE_NODE.
42 * namespaceURI is the namespace URI of the namespace represented by the node.
43 * nodeValue is the same as namespaceURI.
44 * adoptNode, cloneNode, and importNode fail on this node type by raising a DOMException with the code NOT_SUPPORTED_ERR.
45 * Note: In future versions of the XPath specification, the definition of a namespace node may
46 * be changed incomatibly, in which case incompatible changes to field values may be required to
47 * implement versions beyond XPath 1.0.
48 * @since DOM Level 3
49 */
50class CDOM_EXPORT DOMXPathNamespace : public DOMNode
51{
52
53protected:
54    // -----------------------------------------------------------------------
55    //  Hidden constructors
56    // -----------------------------------------------------------------------
57    /** @name Hidden constructors */
58    //@{   
59    DOMXPathNamespace() {};
60    //@}
61
62private:
63    // -----------------------------------------------------------------------
64    // Unimplemented constructors and operators
65    // -----------------------------------------------------------------------
66    /** @name Unimplemented constructors and operators */
67    //@{
68    DOMXPathNamespace(const DOMXPathNamespace &);
69    DOMXPathNamespace& operator = (const  DOMXPathNamespace&);
70    //@}
71
72public:
73
74   
75    enum XPathNodeType {
76        XPATH_NAMESPACE_NODE = 13
77    };
78
79    // -----------------------------------------------------------------------
80    //  All constructors are hidden, just the destructor is available
81    // -----------------------------------------------------------------------
82    /** @name Destructor */
83    //@{
84    /**
85     * Destructor
86     *
87     */
88    virtual ~DOMXPathNamespace() {};
89    //@}
90
91    // -----------------------------------------------------------------------
92    // Virtual DOMDocument interface
93    // -----------------------------------------------------------------------
94    /** @name Functions introduced in DOM Level 3 */
95    //@{
96    /**
97     * The <code>DOMElement</code> on which the namespace was in scope when
98     * it was requested. This does not change on a returned namespace node
99     * even if the document changes such that the namespace goes out of
100     * scope on that element and this node is no longer found there by XPath.
101     * @since DOM Level 3
102     */
103    virtual DOMElement     *getOwnerElement() const = 0;
104
105    //@}
106};
107
108XERCES_CPP_NAMESPACE_END
109
110#endif
Note: See TracBrowser for help on using the repository browser.