source: icXML/icXML-devel/src/xercesc/dom/DOMDocumentType.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: 5.7 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: DOMDocumentType.hpp 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMDOCUMENTTYPE_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMDOCUMENTTYPE_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26#include <xercesc/dom/DOMNode.hpp>
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30
31class DOMNamedNodeMap;
32
33/**
34 * Each <code>DOMDocument</code> has a <code>doctype</code> attribute whose value
35 * is either <code>null</code> or a <code>DOMDocumentType</code> object. The
36 * <code>DOMDocumentType</code> interface in the DOM Core provides an interface
37 * to the list of entities that are defined for the document, and little
38 * else because the effect of namespaces and the various XML schema efforts
39 * on DTD representation are not clearly understood as of this writing.
40 * <p>The DOM Level 2 doesn't support editing <code>DOMDocumentType</code> nodes.
41 * <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>.
42 *
43 * @since DOM Level 1
44 */
45class CDOM_EXPORT DOMDocumentType: public DOMNode {
46protected:
47    // -----------------------------------------------------------------------
48    //  Hidden constructors
49    // -----------------------------------------------------------------------
50    /** @name Hidden constructors */
51    //@{   
52    DOMDocumentType() {};
53    //@}
54
55private:
56    // -----------------------------------------------------------------------
57    // Unimplemented constructors and operators
58    // -----------------------------------------------------------------------
59    /** @name Unimplemented constructors and operators */
60    //@{
61    DOMDocumentType(const DOMDocumentType &);
62    DOMDocumentType & operator = (const DOMDocumentType &);
63    //@}
64
65public:
66    // -----------------------------------------------------------------------
67    //  All constructors are hidden, just the destructor is available
68    // -----------------------------------------------------------------------
69    /** @name Destructor */
70    //@{
71    /**
72     * Destructor
73     *
74     */
75    virtual ~DOMDocumentType() {};
76    //@}
77
78    // -----------------------------------------------------------------------
79    //  Virtual DOMDocumentType interface
80    // -----------------------------------------------------------------------
81    /** @name Functions introduced in DOM Level 1 */
82    //@{
83    /**
84     * The name of DTD; i.e., the name immediately following the
85     * <code>DOCTYPE</code> keyword.
86     *
87     * @since DOM Level 1
88     */
89    virtual const XMLCh *       getName() const = 0;
90
91    /**
92     * A <code>DOMNamedNodeMap</code> containing the general entities, both
93     * external and internal, declared in the DTD. Parameter entities are
94     * not contained. Duplicates are discarded. For example in:
95     * <code>&lt;!DOCTYPE<br>
96     * ex SYSTEM "ex.dtd" [ &lt;!ENTITY foo "foo"&gt; &lt;!ENTITY bar<br>
97     * "bar"&gt; &lt;!ENTITY bar "bar2"&gt; &lt;!ENTITY % baz "baz"&gt;<br>
98     * ]&gt; &lt;ex/&gt;<br></code>
99     *  the interface provides access to <code>foo</code>
100     * and the first declaration of <code>bar</code> but not the second
101     * declaration of <code>bar</code> or <code>baz</code>. Every node in
102     * this map also implements the <code>DOMEntity</code> interface.
103     * <br>The DOM Level 2 does not support editing entities, therefore
104     * <code>entities</code> cannot be altered in any way.
105     *
106     * @since DOM Level 1
107     */
108    virtual DOMNamedNodeMap *getEntities() const = 0;
109
110
111    /**
112     * A <code>DOMNamedNodeMap</code> containing the notations declared in the
113     * DTD. Duplicates are discarded. Every node in this map also implements
114     * the <code>DOMNotation</code> interface.
115     * <br>The DOM Level 2 does not support editing notations, therefore
116     * <code>notations</code> cannot be altered in any way.
117     *
118     * @since DOM Level 1
119     */
120    virtual DOMNamedNodeMap *getNotations() const = 0;
121    //@}
122
123    /** @name Functions introduced in DOM Level 2. */
124    //@{
125    /**
126     * Get the public identifier of the external subset.
127     *
128     * @return The public identifier of the external subset.
129     * @since DOM Level 2
130     */
131    virtual const XMLCh *     getPublicId() const = 0;
132
133    /**
134     * Get the system identifier of the external subset.
135     *
136     * @return The system identifier of the external subset.
137     * @since DOM Level 2
138     */
139    virtual const XMLCh *     getSystemId() const = 0;
140
141    /**
142     * The internal subset as a string, or <code>null</code> if there is none.
143     * This is does not contain the delimiting square brackets.The actual
144     * content returned depends on how much information is available to the
145     * implementation. This may vary depending on various parameters,
146     * including the XML processor used to build the document.
147     *
148     * @return The internal subset as a string.
149     * @since DOM Level 2
150     */
151    virtual const XMLCh *     getInternalSubset() const = 0;
152    //@}
153
154};
155
156XERCES_CPP_NAMESPACE_END
157
158#endif
159
160
Note: See TracBrowser for help on using the repository browser.