source: icXML/icXML-devel/src/xercesc/dom/DOMEntity.hpp @ 2722

Last change on this file since 2722 was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 6.6 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: DOMEntity.hpp 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMENTITY_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMENTITY_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26#include <xercesc/dom/DOMNode.hpp>
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30/**
31 * This interface represents an entity, either parsed or unparsed, in an XML
32 * document. Note that this models the entity itself not the entity
33 * declaration. <code>DOMEntity</code> declaration modeling has been left for a
34 * later Level of the DOM specification.
35 * <p>The <code>nodeName</code> attribute that is inherited from
36 * <code>DOMNode</code> contains the name of the entity.
37 * <p>An XML processor may choose to completely expand entities before the
38 * structure model is passed to the DOM; in this case there will be no
39 * <code>DOMEntityReference</code> nodes in the document tree.
40 * <p>XML does not mandate that a non-validating XML processor read and
41 * process entity declarations made in the external subset or declared in
42 * external parameter entities. This means that parsed entities declared in
43 * the external subset need not be expanded by some classes of applications,
44 * and that the replacement value of the entity may not be available. When
45 * the replacement value is available, the corresponding <code>DOMEntity</code>
46 * node's child list represents the structure of that replacement text.
47 * Otherwise, the child list is empty.
48 * <p>The DOM Level 2 does not support editing <code>DOMEntity</code> nodes; if a
49 * user wants to make changes to the contents of an <code>DOMEntity</code>,
50 * every related <code>DOMEntityReference</code> node has to be replaced in the
51 * structure model by a clone of the <code>DOMEntity</code>'s contents, and
52 * then the desired changes must be made to each of those clones instead.
53 * <code>DOMEntity</code> nodes and all their descendants are readonly.
54 * <p>An <code>DOMEntity</code> node does not have any parent.If the entity
55 * contains an unbound namespace prefix, the <code>namespaceURI</code> of
56 * the corresponding node in the <code>DOMEntity</code> node subtree is
57 * <code>null</code>. The same is true for <code>DOMEntityReference</code>
58 * nodes that refer to this entity, when they are created using the
59 * <code>createEntityReference</code> method of the <code>DOMDocument</code>
60 * interface. The DOM Level 2 does not support any mechanism to resolve
61 * namespace prefixes.
62 * <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>.
63 *
64 * @since DOM Level 1
65 */
66class CDOM_EXPORT DOMEntity: public DOMNode {
67protected:
68    // -----------------------------------------------------------------------
69    //  Hidden constructors
70    // -----------------------------------------------------------------------
71    /** @name Hidden constructors */
72    //@{   
73    DOMEntity() {}
74    DOMEntity(const DOMEntity &other) : DOMNode(other) {}
75    //@}
76
77private:
78    // -----------------------------------------------------------------------
79    // Unimplemented constructors and operators
80    // -----------------------------------------------------------------------
81    /** @name Unimplemented operators */
82    //@{
83    DOMEntity & operator = (const DOMEntity &);
84    //@}
85
86public:
87    // -----------------------------------------------------------------------
88    //  All constructors are hidden, just the destructor is available
89    // -----------------------------------------------------------------------
90    /** @name Destructor */
91    //@{
92    /**
93     * Destructor
94     *
95     */
96    virtual ~DOMEntity() {};
97    //@}
98
99    // -----------------------------------------------------------------------
100    //  Virtual DOMEntity interface
101    // -----------------------------------------------------------------------
102    /** @name Functions introduced in DOM Level 1 */
103    //@{
104    // -----------------------------------------------------------------------
105    //  Getter methods
106    // -----------------------------------------------------------------------
107    /**
108     * The public identifier associated with the entity, if specified.
109     *
110     * If the public identifier was not specified, this is <code>null</code>.
111     *
112     * @since DOM Level 1
113     */
114    virtual const XMLCh *        getPublicId() const = 0;
115
116    /**
117     * The system identifier associated with the entity, if specified.
118     *
119     * If the system identifier was not specified, this is <code>null</code>.
120     *
121     * @since DOM Level 1
122     */
123    virtual const XMLCh *        getSystemId() const = 0;
124
125    /**
126     * For unparsed entities, the name of the notation for the entity.
127     *
128     * For parsed entities, this is <code>null</code>.
129     *
130     * @since DOM Level 1
131     */
132    virtual const XMLCh *        getNotationName() const = 0;
133    //@}
134
135    /** @name Functions introduced in DOM Level 3. */
136    //@{
137
138     /**
139     * An attribute specifying the encoding used for this entity at the time of parsing,
140     * when it is an external parsed entity. This is <code>null</code> if it an entity
141     * from the internal subset or if it is not known.
142     *
143     * @since DOM Level 3
144     */
145    virtual const XMLCh*           getInputEncoding() const = 0;
146
147    /**
148     * An attribute specifying, as part of the text declaration, the encoding
149     * of this entity, when it is an external parsed entity. This is
150     * <code>null</code> otherwise.
151     *
152     * @since DOM Level 3
153     */
154    virtual const XMLCh*           getXmlEncoding() const = 0;
155
156    /**
157     * An attribute specifying, as part of the text declaration, the version
158     * number of this entity, when it is an external parsed entity. This is
159     * <code>null</code> otherwise.
160     *
161     * @since DOM Level 3
162     */
163    virtual const XMLCh*           getXmlVersion() const = 0;
164    //@}
165};
166
167XERCES_CPP_NAMESPACE_END
168
169#endif
170
Note: See TracBrowser for help on using the repository browser.