Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XalanElement.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(XALANELEMENT_HEADER_GUARD_1357924680)
19 #define XALANELEMENT_HEADER_GUARD_1357924680
20 
21 
22 
25 
26 
27 
28 XALAN_CPP_NAMESPACE_BEGIN
29 
30 
31 
32 class XalanAttr;
33 
34 
35 
36 /*
37  * <meta name="usage" content="experimental"/>
38  *
39  * Base class for the DOM Element interface.
40  *
41  * This class is experimental and subject to change!!
42  */
43 
45 {
46 public:
47 
48  XalanElement();
49 
50  virtual
51  ~XalanElement();
52 
53  // These interfaces are inherited from XalanNode
54  virtual const XalanDOMString&
55  getNodeName() const = 0;
56 
57  /**
58  * Gets the value of this node, depending on its type.
59  */
60  virtual const XalanDOMString&
61  getNodeValue() const = 0;
62 
63  /**
64  * An enum value representing the type of the underlying object.
65  */
66  virtual NodeType
67  getNodeType() const = 0;
68 
69  /**
70  * Gets the parent of this node.
71  *
72  * All nodes, except <code>Document</code>,
73  * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.
74  * However, if a node has just been created and not yet added to the tree,
75  * or if it has been removed from the tree, a <code>null</code> Node
76  * is returned.
77  */
78  virtual XalanNode*
79  getParentNode() const = 0;
80 
81  /**
82  * Gets a <code>NodeList</code> that contains all children of this node.
83  *
84  * If there are no children, this is a <code>NodeList</code> containing no nodes.
85  */
86  virtual const XalanNodeList*
87  getChildNodes() const = 0;
88 
89  /**
90  * Gets the first child of this node.
91  *
92  * If there is no such node, this returns <code>null</code>.
93  */
94  virtual XalanNode*
95  getFirstChild() const = 0;
96 
97  /**
98  * Gets the last child of this node.
99  *
100  * If there is no such node, this returns <code>null</code>.
101  */
102  virtual XalanNode*
103  getLastChild() const = 0;
104 
105  /**
106  * Gets the node immediately preceding this node.
107  *
108  * If there is no such node, this returns <code>null</code>.
109  */
110  virtual XalanNode*
111  getPreviousSibling() const = 0;
112 
113  /**
114  * Gets the node immediately following this node.
115  *
116  * If there is no such node, this returns <code>null</code>.
117  */
118  virtual XalanNode*
119  getNextSibling() const = 0;
120 
121  /**
122  * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
123  * is an <code>Element</code>) or <code>null</code> otherwise.
124  */
125  virtual const XalanNamedNodeMap*
126  getAttributes() const = 0;
127 
128  /**
129  * Gets the <code>Document</code> object associated with this node.
130  *
131  * This is also
132  * the <code>Document</code> object used to create new nodes. When this
133  * node is a <code>Document</code> or a <code>DocumentType</code>
134  * which is not used with any <code>Document</code> yet, this is
135  * <code>null</code>.
136  */
137  virtual XalanDocument*
138  getOwnerDocument() const = 0;
139 
140  /**
141  * Get the <em>namespace URI</em> of
142  * this node, or <code>null</code> if it is unspecified.
143  * <p>
144  * This is not a computed value that is the result of a namespace lookup
145  * based on an examination of the namespace declarations in scope. It is
146  * merely the namespace URI given at creation time.
147  * <p>
148  * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and
149  * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method,
150  * such as <CODE>createElement</CODE> from the <CODE>Document</CODE>
151  * interface, this is always <CODE>null</CODE>.
152  */
153  virtual const XalanDOMString&
154  getNamespaceURI() const = 0;
155 
156  /**
157  * Get the <em>namespace prefix</em>
158  * of this node, or <code>null</code> if it is unspecified.
159  */
160  virtual const XalanDOMString&
161  getPrefix() const = 0;
162 
163  /**
164  * Returns the local part of the <em>qualified name</em> of this node.
165  * <p>
166  * For nodes created with a DOM Level 1 method, such as
167  * <code>createElement</code> from the <code>Document</code> interface,
168  * it is null.
169  */
170  virtual const XalanDOMString&
171  getLocalName() const = 0;
172 
173  /**
174  * Determine if the document is node-order indexed.
175  *
176  * @return true if the document is indexed, otherwise false.
177  */
178  virtual bool
179  isIndexed() const = 0;
180 
181  /**
182  * Get the node's index. Valid only if the owner document
183  * reports that the document is node-order indexed.
184  *
185  * @return The index value, or 0 if the node is not indexed.
186  */
187  virtual IndexType
188  getIndex() const = 0;
189 
190  // These interfaces are new to XalanElement...
191 
192  /**
193  * The name of the element.
194  *
195  * For example, in: &lt;elementExample
196  * id="demo"&gt; ... &lt;/elementExample&gt; , <code>tagName</code> has
197  * the value <code>"elementExample"</code>. Note that this is
198  * case-preserving in XML, as are all of the operations of the DOM.
199  */
200  virtual const XalanDOMString&
201  getTagName() const = 0;
202 
203 protected:
204 
205  XalanElement(const XalanElement& theSource);
206 
207  XalanElement&
208  operator=(const XalanElement& theSource);
209 
210  bool
211  operator==(const XalanElement& theRHS) const;
212 
213 private:
214 };
215 
216 
217 
218 XALAN_CPP_NAMESPACE_END
219 
220 
221 
222 #endif // !defined(XALANELEMENT_HEADER_GUARD_1357924680)
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a XalanNamedNodeMap containing the attributes of this node (if it is an XalanElement) or a null ...
virtual XalanNode * getLastChild() const =0
Gets the last child of this node.
XalanNode & operator=(const XalanNode &theSource)
virtual IndexType getIndex() const =0
Get the node&#39;s index.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
bool operator==(const XalanNode &theRHS) const
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node.
virtual XalanNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
#define XALAN_DOM_EXPORT
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual const XalanNodeList * getChildNodes() const =0
Gets a XalanNodeList that contains all children of this node.
virtual XalanNode * getFirstChild() const =0
Gets the first child of this node.
virtual XalanDocument * getOwnerDocument() const =0
Gets the XalanDocument object associated with this node.
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
unsigned long IndexType
Definition: XalanNode.hpp:64
virtual bool isIndexed() const =0
Determine if the document is node-order indexed.
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node.
virtual const XalanDOMString & getNodeName() const =0
Gets the name of this node, depending on its type.

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo