Xalan-C++ API Documentation

XalanDocumentType.hpp

00001 /*00002 * Licensed to the Apache Software Foundation (ASF) under one00003 * or more contributor license agreements. See the NOTICE file00004 * distributed with this work for additional information00005 * regarding copyright ownership. The ASF licenses this file00006 * to you under the Apache License, Version 2.0 (the "License");00007 * you may not use this file except in compliance with the License.00008 * You may obtain a copy of the License at00009 *00010 * http://www.apache.org/licenses/LICENSE-2.000011 *00012 * Unless required by applicable law or agreed to in writing, software00013 * distributed under the License is distributed on an "AS IS" BASIS,00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.00015 * See the License for the specific language governing permissions and00016 * limitations under the License.00017 */00018 #if !defined(XALANDOCUMENTTYPE_HEADER_GUARD_1357924680)00019 #define XALANDOCUMENTTYPE_HEADER_GUARD_135792468000020 00021
00022
00023 #include <xalanc/XalanDOM/XalanDOMDefinitions.hpp>00024 #include <xalanc/XalanDOM/XalanNode.hpp>00025
00026
00027
00028 XALAN_CPP_NAMESPACE_BEGIN
00029
00030
00031
00032 /*00033 * <meta name="usage" content="deprecated"/>00034 *00035 * Base class for the DOM DocumentType interface.00036 *00037 * This class is deprecated and should not be used!!00038 */00039
00040class XALAN_DOM_EXPORTXalanDocumentType : publicXalanNode00041 {
00042 public:
00043
00044 XalanDocumentType();
00045
00046 virtual00047 ~XalanDocumentType();
00048
00049
00050 // These interfaces are inherited from XalanNode...00051 00052 /**00053 * Gets the name of this node.00054 */00055 virtualconstXalanDOMString&
00056 getNodeName() const = 0;
00057 00058 /**00059 * Gets the value of this node, depending on its type.00060 */00061 virtualconstXalanDOMString&
00062 getNodeValue() const = 0;
00063 00064 /**00065 * An enum value representing the type of the underlying object.00066 */00067 virtualNodeType00068 getNodeType() const = 0;
00069 00070 /**00071 * Gets the parent of this node.00072 *00073 * All nodes, except <code>Document</code>,00074 * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.00075 * However, if a node has just been created and not yet added to the tree,00076 * or if it has been removed from the tree, a <code>null</code> Node00077 * is returned.00078 */00079 virtualXalanNode*
00080 getParentNode() const = 0;
00081 00082 /**00083 * Gets a <code>NodeList</code> that contains all children of this node.00084 *00085 * If there are no children, this is a <code>NodeList</code> containing no nodes.00086 */00087 virtualconstXalanNodeList*
00088 getChildNodes() const = 0;
00089 00090 /**00091 * Gets the first child of this node.00092 *00093 * If there is no such node, this returns <code>null</code>.00094 */00095 virtualXalanNode*
00096 getFirstChild() const = 0;
00097 00098 /**00099 * Gets the last child of this node.00100 *00101 * If there is no such node, this returns <code>null</code>.00102 */00103 virtualXalanNode*
00104 getLastChild() const = 0;
00105 00106 /**00107 * Gets the node immediately preceding this node.00108 *00109 * If there is no such node, this returns <code>null</code>.00110 */00111 virtualXalanNode*
00112 getPreviousSibling() const = 0;
00113 00114 /**00115 * Gets the node immediately following this node.00116 *00117 * If there is no such node, this returns <code>null</code>.00118 */00119 virtualXalanNode*
00120 getNextSibling() const = 0;
00121 00122 /**00123 * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it00124 * is an <code>Element</code>) or <code>null</code> otherwise.00125 */00126 virtualconstXalanNamedNodeMap*
00127 getAttributes() const = 0;
00128 00129 /**00130 * Gets the <code>Document</code> object associated with this node.00131 *00132 * This is also00133 * the <code>Document</code> object used to create new nodes. When this00134 * node is a <code>Document</code> or a <code>DocumentType</code>00135 * which is not used with any <code>Document</code> yet, this is00136 * <code>null</code>.00137 */00138 virtualXalanDocument*
00139 getOwnerDocument() const = 0;
00140 00141 /**00142 * Get the <em>namespace URI</em> of00143 * this node, or <code>null</code> if it is unspecified.00144 * <p>00145 * This is not a computed value that is the result of a namespace lookup00146 * based on an examination of the namespace declarations in scope. It is00147 * merely the namespace URI given at creation time.00148 * <p>00149 * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and 00150 * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method, 00151 * such as <CODE>createElement</CODE> from the <CODE>Document</CODE>00152 * interface, this is always <CODE>null</CODE>.00153 */00154 virtualconstXalanDOMString&
00155 getNamespaceURI() const = 0;
00156 00157 /**00158 * Get the <em>namespace prefix</em>00159 * of this node, or <code>null</code> if it is unspecified.00160 */00161 virtualconstXalanDOMString&
00162 getPrefix() const = 0;
00163 00164 /**00165 * Returns the local part of the <em>qualified name</em> of this node.00166 * <p>00167 * For nodes created with a DOM Level 1 method, such as00168 * <code>createElement</code> from the <code>Document</code> interface,00169 * it is null.00170 */00171 virtualconstXalanDOMString&
00172 getLocalName() const = 0;
00173 00174 /**00175 * Determine if the document is node-order indexed.00176 *00177 * @return true if the document is indexed, otherwise false.00178 */00179 virtualbool00180 isIndexed() const = 0;
00181 00182 /**00183 * Get the node's index. Valid only if the owner document00184 * reports that the document is node-order indexed.00185 *00186 * @return The index value, or 0 if the node is not indexed.00187 */00188 virtualIndexType00189 getIndex() const = 0;
00190
00191 // These interfaces are new to XalanDocumentType...00192 00193 /**00194 * The name of DTD; i.e., the name immediately following the 00195 * <code>DOCTYPE</code> keyword in an XML source document.00196 */00197 virtualconstXalanDOMString&
00198 getName() const = 0;
00199 00200 /**00201 * This function returns a <code>NamedNodeMap</code> containing the general entities, both 00202 * external and internal, declared in the DTD. Parameter entities are not contained.00203 * Duplicates are discarded. 00204 */00205 virtualconstXalanNamedNodeMap*
00206 getEntities() const = 0;
00207 00208 /**00209 * This function returns a named node map containing an entry for00210 * each notation declared in a document's DTD. Duplicates are discarded.00211 */00212 virtualconstXalanNamedNodeMap*
00213 getNotations() const = 0;
00214 00215 /**00216 * Get the public identifier of the external subset.00217 * @return The public identifier of the external subset.00218 */00219 virtualconstXalanDOMString&
00220 getPublicId() const = 0;
00221 00222 /**00223 * Get the system identifier of the external subset.00224 * @return The system identifier of the external subset.00225 */00226 virtualconstXalanDOMString&
00227 getSystemId() const = 0;
00228 00229 /**00230 * Get the internal subset as a string.00231 * @return The internal subset as a string.00232 */00233 virtualconstXalanDOMString&
00234 getInternalSubset() const = 0;
00235
00236 protected:
00237
00238 XalanDocumentType(constXalanDocumentType& theSource);
00239
00240 XalanDocumentType&
00241 operator=(constXalanDocumentType& theSource);
00242
00243 bool00244 operator==(constXalanDocumentType& theRHS) const;
00245
00246 private:
00247 };
00248
00249
00250
00251 XALAN_CPP_NAMESPACE_END
00252
00253
00254
00255 #endif // !defined(XALANDOCUMENTTYPE_HEADER_GUARD_1357924680)