source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/dom/DOMXPathNamespace.hpp @ 2674

Revision 2674, 4.4 KB checked in by mattausch, 16 years ago (diff)
Line 
1#ifndef DOMXPathNamespace_HEADER_GUARD_
2#define DOMXPathNamespace_HEADER_GUARD_
3
4/*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements.  See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License.  You may obtain a copy of the License at
11 *
12 *      http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21#include <xercesc/dom/DOMNode.hpp>
22
23XERCES_CPP_NAMESPACE_BEGIN
24
25class DOMElement;
26
27/**
28 * The <code>DOMXPathNamespace</code> interface is returned by <code>DOMXPathResult</code>
29 * interfaces to represent the XPath namespace node type that DOM lacks. There is no
30 * public constructor for this node type. Attempts to place it into a hierarchy or a
31 * NamedNodeMap result in a DOMException with the code HIERARCHY_REQUEST_ERR. This node
32 * is read only, so methods or setting of attributes that would mutate the node result
33 * in a <code>DOMException</code> with the code NO_MODIFICATION_ALLOWED_ERR.
34 * The core specification describes attributes of the <code>DOMNode</code> interface that
35 * are different for different node types but does not describe XPATH_NAMESPACE_NODE,
36 * so here is a description of those attributes for this node type. All attributes of
37 * <code>DOMNode</code> not described in this section have a null or false value.
38 * ownerDocument matches the ownerDocument of the ownerElement even if the element is later adopted.
39 * nodeName is always the string "#namespace".
40 * prefix is the prefix of the namespace represented by the node.
41 * localName is the same as prefix.
42 * nodeType is equal to XPATH_NAMESPACE_NODE.
43 * namespaceURI is the namespace URI of the namespace represented by the node.
44 * nodeValue is the same as namespaceURI.
45 * adoptNode, cloneNode, and importNode fail on this node type by raising a DOMException with the code NOT_SUPPORTED_ERR.
46 * Note: In future versions of the XPath specification, the definition of a namespace node may
47 * be changed incomatibly, in which case incompatible changes to field values may be required to
48 * implement versions beyond XPath 1.0.
49 * @since DOM Level 3
50 */
51class CDOM_EXPORT DOMXPathNamespace : public DOMNode
52{
53
54protected:
55    // -----------------------------------------------------------------------
56    //  Hidden constructors
57    // -----------------------------------------------------------------------
58    /** @name Hidden constructors */
59    //@{   
60    DOMXPathNamespace() {};
61    //@}
62
63private:
64    // -----------------------------------------------------------------------
65    // Unimplemented constructors and operators
66    // -----------------------------------------------------------------------
67    /** @name Unimplemented constructors and operators */
68    //@{
69    DOMXPathNamespace(const DOMXPathNamespace &);
70    DOMXPathNamespace& operator = (const  DOMXPathNamespace&);
71    //@}
72
73public:
74
75   
76    enum XPathNodeType {
77        XPATH_NAMESPACE_NODE = 13
78    };
79
80    // -----------------------------------------------------------------------
81    //  All constructors are hidden, just the destructor is available
82    // -----------------------------------------------------------------------
83    /** @name Destructor */
84    //@{
85    /**
86     * Destructor
87     *
88     */
89    virtual ~DOMXPathNamespace() {};
90    //@}
91
92    // -----------------------------------------------------------------------
93    // Virtual DOMDocument interface
94    // -----------------------------------------------------------------------
95    /** @name Functions introduced in DOM Level 3 */
96    //@{
97    /**
98     * The <code>DOMElement</code> on which the namespace was in scope when
99     * it was requested. This does not change on a returned namespace node
100     * even if the document changes such that the namespace goes out of
101     * scope on that element and this node is no longer found there by XPath.
102     * @since DOM Level 3
103     */
104    virtual DOMElement     *getOwnerElement() const = 0;
105
106    //@}
107};
108
109XERCES_CPP_NAMESPACE_END
110
111#endif
Note: See TracBrowser for help on using the repository browser.