source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/dom/DOMDocumentType.hpp @ 2674

Revision 2674, 5.7 KB checked in by mattausch, 16 years ago (diff)
Line 
1#ifndef DOMDocumentType_HEADER_GUARD_
2#define DOMDocumentType_HEADER_GUARD_
3
4
5/*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements.  See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License.  You may obtain a copy of the License at
12 *
13 *      http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22/*
23 * $Id: DOMDocumentType.hpp 568078 2007-08-21 11:43:25Z amassari $
24 */
25
26#include <xercesc/util/XercesDefs.hpp>
27#include <xercesc/dom/DOMNode.hpp>
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31
32class DOMNamedNodeMap;
33
34/**
35 * Each <code>DOMDocument</code> has a <code>doctype</code> attribute whose value
36 * is either <code>null</code> or a <code>DOMDocumentType</code> object. The
37 * <code>DOMDocumentType</code> interface in the DOM Core provides an interface
38 * to the list of entities that are defined for the document, and little
39 * else because the effect of namespaces and the various XML schema efforts
40 * on DTD representation are not clearly understood as of this writing.
41 * <p>The DOM Level 2 doesn't support editing <code>DOMDocumentType</code> nodes.
42 * <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>.
43 *
44 * @since DOM Level 1
45 */
46class CDOM_EXPORT DOMDocumentType: public DOMNode {
47protected:
48    // -----------------------------------------------------------------------
49    //  Hidden constructors
50    // -----------------------------------------------------------------------
51    /** @name Hidden constructors */
52    //@{   
53    DOMDocumentType() {};
54    //@}
55
56private:
57    // -----------------------------------------------------------------------
58    // Unimplemented constructors and operators
59    // -----------------------------------------------------------------------
60    /** @name Unimplemented constructors and operators */
61    //@{
62    DOMDocumentType(const DOMDocumentType &);
63    DOMDocumentType & operator = (const DOMDocumentType &);
64    //@}
65
66public:
67    // -----------------------------------------------------------------------
68    //  All constructors are hidden, just the destructor is available
69    // -----------------------------------------------------------------------
70    /** @name Destructor */
71    //@{
72    /**
73     * Destructor
74     *
75     */
76    virtual ~DOMDocumentType() {};
77    //@}
78
79    // -----------------------------------------------------------------------
80    //  Virtual DOMDocumentType interface
81    // -----------------------------------------------------------------------
82    /** @name Functions introduced in DOM Level 1 */
83    //@{
84    /**
85     * The name of DTD; i.e., the name immediately following the
86     * <code>DOCTYPE</code> keyword.
87     *
88     * @since DOM Level 1
89     */
90    virtual const XMLCh *       getName() const = 0;
91
92    /**
93     * A <code>DOMNamedNodeMap</code> containing the general entities, both
94     * external and internal, declared in the DTD. Parameter entities are
95     * not contained. Duplicates are discarded. For example in:
96     * <code>&lt;!DOCTYPE<br>
97     * ex SYSTEM "ex.dtd" [ &lt;!ENTITY foo "foo"&gt; &lt;!ENTITY bar<br>
98     * "bar"&gt; &lt;!ENTITY bar "bar2"&gt; &lt;!ENTITY % baz "baz"&gt;<br>
99     * ]&gt; &lt;ex/&gt;<br></code>
100     *  the interface provides access to <code>foo</code>
101     * and the first declaration of <code>bar</code> but not the second
102     * declaration of <code>bar</code> or <code>baz</code>. Every node in
103     * this map also implements the <code>DOMEntity</code> interface.
104     * <br>The DOM Level 2 does not support editing entities, therefore
105     * <code>entities</code> cannot be altered in any way.
106     *
107     * @since DOM Level 1
108     */
109    virtual DOMNamedNodeMap *getEntities() const = 0;
110
111
112    /**
113     * A <code>DOMNamedNodeMap</code> containing the notations declared in the
114     * DTD. Duplicates are discarded. Every node in this map also implements
115     * the <code>DOMNotation</code> interface.
116     * <br>The DOM Level 2 does not support editing notations, therefore
117     * <code>notations</code> cannot be altered in any way.
118     *
119     * @since DOM Level 1
120     */
121    virtual DOMNamedNodeMap *getNotations() const = 0;
122    //@}
123
124    /** @name Functions introduced in DOM Level 2. */
125    //@{
126    /**
127     * Get the public identifier of the external subset.
128     *
129     * @return The public identifier of the external subset.
130     * @since DOM Level 2
131     */
132    virtual const XMLCh *     getPublicId() const = 0;
133
134    /**
135     * Get the system identifier of the external subset.
136     *
137     * @return The system identifier of the external subset.
138     * @since DOM Level 2
139     */
140    virtual const XMLCh *     getSystemId() const = 0;
141
142    /**
143     * The internal subset as a string, or <code>null</code> if there is none.
144     * This is does not contain the delimiting square brackets.The actual
145     * content returned depends on how much information is available to the
146     * implementation. This may vary depending on various parameters,
147     * including the XML processor used to build the document.
148     *
149     * @return The internal subset as a string.
150     * @since DOM Level 2
151     */
152    virtual const XMLCh *     getInternalSubset() const = 0;
153    //@}
154
155};
156
157XERCES_CPP_NAMESPACE_END
158
159#endif
160
161
Note: See TracBrowser for help on using the repository browser.