|
||||
File indexing completed on 2025-01-30 10:27:03
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMENTITY_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DOMENTITY_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 #include <xercesc/dom/DOMNode.hpp> 0027 0028 XERCES_CPP_NAMESPACE_BEGIN 0029 0030 /** 0031 * This interface represents an entity, either parsed or unparsed, in an XML 0032 * document. Note that this models the entity itself not the entity 0033 * declaration. <code>DOMEntity</code> declaration modeling has been left for a 0034 * later Level of the DOM specification. 0035 * <p>The <code>nodeName</code> attribute that is inherited from 0036 * <code>DOMNode</code> contains the name of the entity. 0037 * <p>An XML processor may choose to completely expand entities before the 0038 * structure model is passed to the DOM; in this case there will be no 0039 * <code>DOMEntityReference</code> nodes in the document tree. 0040 * <p>XML does not mandate that a non-validating XML processor read and 0041 * process entity declarations made in the external subset or declared in 0042 * external parameter entities. This means that parsed entities declared in 0043 * the external subset need not be expanded by some classes of applications, 0044 * and that the replacement value of the entity may not be available. When 0045 * the replacement value is available, the corresponding <code>DOMEntity</code> 0046 * node's child list represents the structure of that replacement text. 0047 * Otherwise, the child list is empty. 0048 * <p>The DOM Level 2 does not support editing <code>DOMEntity</code> nodes; if a 0049 * user wants to make changes to the contents of an <code>DOMEntity</code>, 0050 * every related <code>DOMEntityReference</code> node has to be replaced in the 0051 * structure model by a clone of the <code>DOMEntity</code>'s contents, and 0052 * then the desired changes must be made to each of those clones instead. 0053 * <code>DOMEntity</code> nodes and all their descendants are readonly. 0054 * <p>An <code>DOMEntity</code> node does not have any parent.If the entity 0055 * contains an unbound namespace prefix, the <code>namespaceURI</code> of 0056 * the corresponding node in the <code>DOMEntity</code> node subtree is 0057 * <code>null</code>. The same is true for <code>DOMEntityReference</code> 0058 * nodes that refer to this entity, when they are created using the 0059 * <code>createEntityReference</code> method of the <code>DOMDocument</code> 0060 * interface. The DOM Level 2 does not support any mechanism to resolve 0061 * namespace prefixes. 0062 * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>. 0063 * 0064 * @since DOM Level 1 0065 */ 0066 class CDOM_EXPORT DOMEntity: public DOMNode { 0067 protected: 0068 // ----------------------------------------------------------------------- 0069 // Hidden constructors 0070 // ----------------------------------------------------------------------- 0071 /** @name Hidden constructors */ 0072 //@{ 0073 DOMEntity() {} 0074 DOMEntity(const DOMEntity &other) : DOMNode(other) {} 0075 //@} 0076 0077 private: 0078 // ----------------------------------------------------------------------- 0079 // Unimplemented constructors and operators 0080 // ----------------------------------------------------------------------- 0081 /** @name Unimplemented operators */ 0082 //@{ 0083 DOMEntity & operator = (const DOMEntity &); 0084 //@} 0085 0086 public: 0087 // ----------------------------------------------------------------------- 0088 // All constructors are hidden, just the destructor is available 0089 // ----------------------------------------------------------------------- 0090 /** @name Destructor */ 0091 //@{ 0092 /** 0093 * Destructor 0094 * 0095 */ 0096 virtual ~DOMEntity() {}; 0097 //@} 0098 0099 // ----------------------------------------------------------------------- 0100 // Virtual DOMEntity interface 0101 // ----------------------------------------------------------------------- 0102 /** @name Functions introduced in DOM Level 1 */ 0103 //@{ 0104 // ----------------------------------------------------------------------- 0105 // Getter methods 0106 // ----------------------------------------------------------------------- 0107 /** 0108 * The public identifier associated with the entity, if specified. 0109 * 0110 * If the public identifier was not specified, this is <code>null</code>. 0111 * 0112 * @since DOM Level 1 0113 */ 0114 virtual const XMLCh * getPublicId() const = 0; 0115 0116 /** 0117 * The system identifier associated with the entity, if specified. 0118 * 0119 * If the system identifier was not specified, this is <code>null</code>. 0120 * 0121 * @since DOM Level 1 0122 */ 0123 virtual const XMLCh * getSystemId() const = 0; 0124 0125 /** 0126 * For unparsed entities, the name of the notation for the entity. 0127 * 0128 * For parsed entities, this is <code>null</code>. 0129 * 0130 * @since DOM Level 1 0131 */ 0132 virtual const XMLCh * getNotationName() const = 0; 0133 //@} 0134 0135 /** @name Functions introduced in DOM Level 3. */ 0136 //@{ 0137 0138 /** 0139 * An attribute specifying the encoding used for this entity at the time of parsing, 0140 * when it is an external parsed entity. This is <code>null</code> if it an entity 0141 * from the internal subset or if it is not known. 0142 * 0143 * @since DOM Level 3 0144 */ 0145 virtual const XMLCh* getInputEncoding() const = 0; 0146 0147 /** 0148 * An attribute specifying, as part of the text declaration, the encoding 0149 * of this entity, when it is an external parsed entity. This is 0150 * <code>null</code> otherwise. 0151 * 0152 * @since DOM Level 3 0153 */ 0154 virtual const XMLCh* getXmlEncoding() const = 0; 0155 0156 /** 0157 * An attribute specifying, as part of the text declaration, the version 0158 * number of this entity, when it is an external parsed entity. This is 0159 * <code>null</code> otherwise. 0160 * 0161 * @since DOM Level 3 0162 */ 0163 virtual const XMLCh* getXmlVersion() const = 0; 0164 //@} 0165 }; 0166 0167 XERCES_CPP_NAMESPACE_END 0168 0169 #endif 0170
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |