00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * 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 at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * 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 and 00016 * limitations under the License. 00017 */ 00018 #if !defined(XALANPROCESSINGINSTRUCTION_HEADER_GUARD_1357924680) 00019 #define XALANPROCESSINGINSTRUCTION_HEADER_GUARD_1357924680 00020 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 class XALAN_DOM_EXPORT XalanProcessingInstruction : public XalanNode 00033 { 00034 public: 00035 00036 XalanProcessingInstruction(); 00037 00038 virtual 00039 ~XalanProcessingInstruction(); 00040 00041 00042 // These interfaces are inherited from XalanNode... 00043 virtual const XalanDOMString& 00044 getNodeName() const = 0; 00045 00046 /** 00047 * Gets the value of this node, depending on its type. 00048 */ 00049 virtual const XalanDOMString& 00050 getNodeValue() const = 0; 00051 00052 /** 00053 * An enum value representing the type of the underlying object. 00054 */ 00055 virtual NodeType 00056 getNodeType() const = 0; 00057 00058 /** 00059 * Gets the parent of this node. 00060 * 00061 * All nodes, except <code>Document</code>, 00062 * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent. 00063 * However, if a node has just been created and not yet added to the tree, 00064 * or if it has been removed from the tree, a <code>null</code> Node 00065 * is returned. 00066 */ 00067 virtual XalanNode* 00068 getParentNode() const = 0; 00069 00070 /** 00071 * Gets a <code>NodeList</code> that contains all children of this node. 00072 * 00073 * If there 00074 * are no children, this is a <code>NodeList</code> containing no nodes. 00075 * The content of the returned <code>NodeList</code> is "live" in the sense 00076 * that, for instance, changes to the children of the node object that 00077 * it was created from are immediately reflected in the nodes returned by 00078 * the <code>NodeList</code> accessors; it is not a static snapshot of the 00079 * content of the node. This is true for every <code>NodeList</code>, 00080 * including the ones returned by the <code>getElementsByTagName</code> 00081 * method. 00082 */ 00083 virtual const XalanNodeList* 00084 getChildNodes() const = 0; 00085 00086 /** 00087 * Gets the first child of this node. 00088 * 00089 * If there is no such node, this returns <code>null</code>. 00090 */ 00091 virtual XalanNode* 00092 getFirstChild() const = 0; 00093 00094 /** 00095 * Gets the last child of this node. 00096 * 00097 * If there is no such node, this returns <code>null</code>. 00098 */ 00099 virtual XalanNode* 00100 getLastChild() const = 0; 00101 00102 /** 00103 * Gets the node immediately preceding this node. 00104 * 00105 * If there is no such node, this returns <code>null</code>. 00106 */ 00107 virtual XalanNode* 00108 getPreviousSibling() const = 0; 00109 00110 /** 00111 * Gets the node immediately following this node. 00112 * 00113 * If there is no such node, this returns <code>null</code>. 00114 */ 00115 virtual XalanNode* 00116 getNextSibling() const = 0; 00117 00118 /** 00119 * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it 00120 * is an <code>Element</code>) or <code>null</code> otherwise. 00121 */ 00122 virtual const XalanNamedNodeMap* 00123 getAttributes() const = 0; 00124 00125 /** 00126 * Gets the <code>Document</code> object associated with this node. 00127 * 00128 * This is also 00129 * the <code>Document</code> object used to create new nodes. When this 00130 * node is a <code>Document</code> or a <code>DocumentType</code> 00131 * which is not used with any <code>Document</code> yet, this is 00132 * <code>null</code>. 00133 */ 00134 virtual XalanDocument* 00135 getOwnerDocument() const = 0; 00136 00137 /** 00138 * Get the <em>namespace URI</em> of 00139 * this node, or <code>null</code> if it is unspecified. 00140 * <p> 00141 * This is not a computed value that is the result of a namespace lookup 00142 * based on an examination of the namespace declarations in scope. It is 00143 * merely the namespace URI given at creation time. 00144 * <p> 00145 * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and 00146 * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method, 00147 * such as <CODE>createElement</CODE> from the <CODE>Document</CODE> 00148 * interface, this is always <CODE>null</CODE>. 00149 */ 00150 virtual const XalanDOMString& 00151 getNamespaceURI() const = 0; 00152 00153 /** 00154 * Get the <em>namespace prefix</em> 00155 * of this node, or <code>null</code> if it is unspecified. 00156 */ 00157 virtual const XalanDOMString& 00158 getPrefix() const = 0; 00159 00160 /** 00161 * Returns the local part of the <em>qualified name</em> of this node. 00162 * <p> 00163 * For nodes created with a DOM Level 1 method, such as 00164 * <code>createElement</code> from the <code>Document</code> interface, 00165 * it is null. 00166 */ 00167 virtual const XalanDOMString& 00168 getLocalName() const = 0; 00169 00170 /** 00171 * Determine if the document is node-order indexed. 00172 * 00173 * @return true if the document is indexed, otherwise false. 00174 */ 00175 virtual bool 00176 isIndexed() const = 0; 00177 00178 /** 00179 * Get the node's index. Valid only if the owner document 00180 * reports that the document is node-order indexed. 00181 * 00182 * @return The index value, or 0 if the node is not indexed. 00183 */ 00184 virtual IndexType 00185 getIndex() const = 0; 00186 00187 // These interfaces are new to XalanProcessingInstruction... 00188 00189 /** 00190 * The target of this processing instruction. 00191 * 00192 * XML defines this as being the 00193 * first token following the markup that begins the processing instruction. 00194 */ 00195 virtual const XalanDOMString& 00196 getTarget() const = 0; 00197 00198 /** 00199 * The content of this processing instruction. 00200 * 00201 * This is from the first non 00202 * white space character after the target to the character immediately 00203 * preceding the <code>?></code>. 00204 * @exception DOMException 00205 * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. 00206 */ 00207 virtual const XalanDOMString& 00208 getData() const = 0; 00209 00210 protected: 00211 00212 XalanProcessingInstruction(const XalanProcessingInstruction& theSource); 00213 00214 XalanProcessingInstruction& 00215 operator=(const XalanProcessingInstruction& theSource); 00216 00217 bool 00218 operator==(const XalanProcessingInstruction& theRHS) const; 00219 00220 private: 00221 }; 00222 00223 00224 00225 XALAN_CPP_NAMESPACE_END 00226 00227 00228 00229 #endif // !defined(XALANPROCESSINGINSTRUCTION_HEADER_GUARD_1357924680)
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|