Xalan-C++ API Reference 1.12.0
XalanNotation.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XALANNOTATION_HEADER_GUARD_1357924680)
19#define XALANNOTATION_HEADER_GUARD_1357924680
20
21
22
25
26
27
28namespace XALAN_CPP_NAMESPACE {
29
30
31
32/*
33 * <meta name="usage" content="deprecated"/>
34 *
35 * Base class for the DOM Notation interface.
36 *
37 * This class is deprecated and should not be used!!
38 */
39
41{
42public:
43
45
46 virtual
48
49
50 // These interfaces are inherited from XalanNode...
51 virtual const XalanDOMString&
52 getNodeName() const = 0;
53
54 /**
55 * Gets the value of this node, depending on its type.
56 */
57 virtual const XalanDOMString&
58 getNodeValue() const = 0;
59
60 /**
61 * An enum value representing the type of the underlying object.
62 */
63 virtual NodeType
64 getNodeType() const = 0;
65
66 /**
67 * Gets the parent of this node.
68 *
69 * All nodes, except <code>Document</code>,
70 * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.
71 * However, if a node has just been created and not yet added to the tree,
72 * or if it has been removed from the tree, a <code>null</code> Node
73 * is returned.
74 */
75 virtual XalanNode*
76 getParentNode() const = 0;
77
78 /**
79 * Gets a <code>NodeList</code> that contains all children of this node.
80 *
81 * If there
82 * are no children, this is a <code>NodeList</code> containing no nodes.
83 * The content of the returned <code>NodeList</code> is "live" in the sense
84 * that, for instance, changes to the children of the node object that
85 * it was created from are immediately reflected in the nodes returned by
86 * the <code>NodeList</code> accessors; it is not a static snapshot of the
87 * content of the node. This is true for every <code>NodeList</code>,
88 * including the ones returned by the <code>getElementsByTagName</code>
89 * method.
90 */
91 virtual const XalanNodeList*
92 getChildNodes() const = 0;
93
94 /**
95 * Gets the first child of this node.
96 *
97 * If there is no such node, this returns <code>null</code>.
98 */
99 virtual XalanNode*
100 getFirstChild() const = 0;
101
102 /**
103 * Gets the last child of this node.
104 *
105 * If there is no such node, this returns <code>null</code>.
106 */
107 virtual XalanNode*
108 getLastChild() const = 0;
109
110 /**
111 * Gets the node immediately preceding this node.
112 *
113 * If there is no such node, this returns <code>null</code>.
114 */
115 virtual XalanNode*
117
118 /**
119 * Gets the node immediately following this node.
120 *
121 * If there is no such node, this returns <code>null</code>.
122 */
123 virtual XalanNode*
124 getNextSibling() const = 0;
125
126 /**
127 * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
128 * is an <code>Element</code>) or <code>null</code> otherwise.
129 */
130 virtual const XalanNamedNodeMap*
131 getAttributes() const = 0;
132
133 /**
134 * Gets the <code>Document</code> object associated with this node.
135 *
136 * This is also
137 * the <code>Document</code> object used to create new nodes. When this
138 * node is a <code>Document</code> or a <code>DocumentType</code>
139 * which is not used with any <code>Document</code> yet, this is
140 * <code>null</code>.
141 */
142 virtual XalanDocument*
143 getOwnerDocument() const = 0;
144
145 /**
146 * Get the <em>namespace URI</em> of
147 * this node, or <code>null</code> if it is unspecified.
148 * <p>
149 * This is not a computed value that is the result of a namespace lookup
150 * based on an examination of the namespace declarations in scope. It is
151 * merely the namespace URI given at creation time.
152 * <p>
153 * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and
154 * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method,
155 * such as <CODE>createElement</CODE> from the <CODE>Document</CODE>
156 * interface, this is always <CODE>null</CODE>.
157 */
158 virtual const XalanDOMString&
159 getNamespaceURI() const = 0;
160
161 /**
162 * Get the <em>namespace prefix</em>
163 * of this node, or <code>null</code> if it is unspecified.
164 */
165 virtual const XalanDOMString&
166 getPrefix() const = 0;
167
168 /**
169 * Returns the local part of the <em>qualified name</em> of this node.
170 * <p>
171 * For nodes created with a DOM Level 1 method, such as
172 * <code>createElement</code> from the <code>Document</code> interface,
173 * it is null.
174 */
175 virtual const XalanDOMString&
176 getLocalName() const = 0;
177
178 /**
179 * Determine if the document is node-order indexed.
180 *
181 * @return true if the document is indexed, otherwise false.
182 */
183 virtual bool
184 isIndexed() const = 0;
185
186 /**
187 * Get the node's index. Valid only if the owner document
188 * reports that the document is node-order indexed.
189 *
190 * @return The index value, or 0 if the node is not indexed.
191 */
192 virtual IndexType
193 getIndex() const = 0;
194
195 // These interfaces are new to XalanNotation...
196
197 /**
198 * Get the public identifier of this notation.
199 *
200 * If the public identifier was not
201 * specified, this is <code>null</code>.
202 * @return Returns the public identifier of the notation
203 */
204 virtual const XalanDOMString&
205 getPublicId() const = 0;
206
207 /**
208 * Get the system identifier of this notation.
209 *
210 * If the system identifier was not
211 * specified, this is <code>null</code>.
212 * @return Returns the system identifier of the notation
213 */
214 virtual const XalanDOMString&
215 getSystemId() const = 0;
216
217protected:
218
220
223
224 bool
226
227private:
228};
229
230
231
232}
233
234
235
236#endif // !defined(XALANNOTATION_HEADER_GUARD_1357924680)
#define XALAN_DOM_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
virtual bool isIndexed() const =0
Determine if the document is node-order indexed.
virtual XalanNode * getLastChild() const =0
Gets the last child of this node.
virtual XalanNode * getFirstChild() const =0
Gets the first child of this node.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
XalanNotation & operator=(const XalanNotation &theSource)
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
bool operator==(const XalanNotation &theRHS) const
virtual const XalanDOMString & getPublicId() const =0
Get the public identifier of this notation.
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
virtual const XalanDOMString & getSystemId() const =0
Get the system identifier of this notation.
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual const XalanNodeList * getChildNodes() const =0
Gets a NodeList that contains all children of this node.
virtual const XalanDOMString & getNodeName() const =0
Gets the name of this node, depending on its type.
virtual XalanNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
virtual IndexType getIndex() const =0
Get the node's index.
virtual XalanDocument * getOwnerDocument() const =0
Gets the Document object associated with this node.
XalanNotation(const XalanNotation &theSource)