1 | #ifndef DOMDocumentType_HEADER_GUARD_
|
---|
2 | #define DOMDocumentType_HEADER_GUARD_
|
---|
3 |
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * The Apache Software License, Version 1.1
|
---|
7 | *
|
---|
8 | * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
|
---|
9 | * reserved.
|
---|
10 | *
|
---|
11 | * Redistribution and use in source and binary forms, with or without
|
---|
12 | * modification, are permitted provided that the following conditions
|
---|
13 | * are met:
|
---|
14 | *
|
---|
15 | * 1. Redistributions of source code must retain the above copyright
|
---|
16 | * notice, this list of conditions and the following disclaimer.
|
---|
17 | *
|
---|
18 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
19 | * notice, this list of conditions and the following disclaimer in
|
---|
20 | * the documentation and/or other materials provided with the
|
---|
21 | * distribution.
|
---|
22 | *
|
---|
23 | * 3. The end-user documentation included with the redistribution,
|
---|
24 | * if any, must include the following acknowledgment:
|
---|
25 | * "This product includes software developed by the
|
---|
26 | * Apache Software Foundation (http://www.apache.org/)."
|
---|
27 | * Alternately, this acknowledgment may appear in the software itself,
|
---|
28 | * if and wherever such third-party acknowledgments normally appear.
|
---|
29 | *
|
---|
30 | * 4. The names "Xerces" and "Apache Software Foundation" must
|
---|
31 | * not be used to endorse or promote products derived from this
|
---|
32 | * software without prior written permission. For written
|
---|
33 | * permission, please contact apache\@apache.org.
|
---|
34 | *
|
---|
35 | * 5. Products derived from this software may not be called "Apache",
|
---|
36 | * nor may "Apache" appear in their name, without prior written
|
---|
37 | * permission of the Apache Software Foundation.
|
---|
38 | *
|
---|
39 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
---|
40 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
41 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
---|
42 | * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
---|
43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
---|
44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
---|
45 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
---|
46 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
---|
47 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
---|
48 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
---|
49 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
50 | * SUCH DAMAGE.
|
---|
51 | * ====================================================================
|
---|
52 | *
|
---|
53 | * This software consists of voluntary contributions made by many
|
---|
54 | * individuals on behalf of the Apache Software Foundation, and was
|
---|
55 | * originally based on software copyright (c) 2001, International
|
---|
56 | * Business Machines, Inc., http://www.ibm.com . For more information
|
---|
57 | * on the Apache Software Foundation, please see
|
---|
58 | * <http://www.apache.org/>.
|
---|
59 | */
|
---|
60 |
|
---|
61 | /*
|
---|
62 | * $Id: DOMDocumentType.hpp,v 1.6 2003/03/07 19:59:02 tng Exp $
|
---|
63 | */
|
---|
64 |
|
---|
65 | #include <xercesc/util/XercesDefs.hpp>
|
---|
66 | #include "DOMNode.hpp"
|
---|
67 |
|
---|
68 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
69 |
|
---|
70 |
|
---|
71 | class DOMNamedNodeMap;
|
---|
72 |
|
---|
73 | /**
|
---|
74 | * Each <code>DOMDocument</code> has a <code>doctype</code> attribute whose value
|
---|
75 | * is either <code>null</code> or a <code>DOMDocumentType</code> object. The
|
---|
76 | * <code>DOMDocumentType</code> interface in the DOM Core provides an interface
|
---|
77 | * to the list of entities that are defined for the document, and little
|
---|
78 | * else because the effect of namespaces and the various XML schema efforts
|
---|
79 | * on DTD representation are not clearly understood as of this writing.
|
---|
80 | * <p>The DOM Level 2 doesn't support editing <code>DOMDocumentType</code> nodes.
|
---|
81 | * <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>.
|
---|
82 | *
|
---|
83 | * @since DOM Level 1
|
---|
84 | */
|
---|
85 | class CDOM_EXPORT DOMDocumentType: public DOMNode {
|
---|
86 | protected:
|
---|
87 | // -----------------------------------------------------------------------
|
---|
88 | // Hidden constructors
|
---|
89 | // -----------------------------------------------------------------------
|
---|
90 | /** @name Hidden constructors */
|
---|
91 | //@{
|
---|
92 | DOMDocumentType() {};
|
---|
93 | //@}
|
---|
94 |
|
---|
95 | private:
|
---|
96 | // -----------------------------------------------------------------------
|
---|
97 | // Unimplemented constructors and operators
|
---|
98 | // -----------------------------------------------------------------------
|
---|
99 | /** @name Unimplemented constructors and operators */
|
---|
100 | //@{
|
---|
101 | DOMDocumentType(const DOMDocumentType &);
|
---|
102 | DOMDocumentType & operator = (const DOMDocumentType &);
|
---|
103 | //@}
|
---|
104 |
|
---|
105 | public:
|
---|
106 | // -----------------------------------------------------------------------
|
---|
107 | // All constructors are hidden, just the destructor is available
|
---|
108 | // -----------------------------------------------------------------------
|
---|
109 | /** @name Destructor */
|
---|
110 | //@{
|
---|
111 | /**
|
---|
112 | * Destructor
|
---|
113 | *
|
---|
114 | */
|
---|
115 | virtual ~DOMDocumentType() {};
|
---|
116 | //@}
|
---|
117 |
|
---|
118 | // -----------------------------------------------------------------------
|
---|
119 | // Virtual DOMDocumentType interface
|
---|
120 | // -----------------------------------------------------------------------
|
---|
121 | /** @name Functions introduced in DOM Level 1 */
|
---|
122 | //@{
|
---|
123 | /**
|
---|
124 | * The name of DTD; i.e., the name immediately following the
|
---|
125 | * <code>DOCTYPE</code> keyword.
|
---|
126 | *
|
---|
127 | * @since DOM Level 1
|
---|
128 | */
|
---|
129 | virtual const XMLCh * getName() const = 0;
|
---|
130 |
|
---|
131 | /**
|
---|
132 | * A <code>DOMNamedNodeMap</code> containing the general entities, both
|
---|
133 | * external and internal, declared in the DTD. Parameter entities are
|
---|
134 | * not contained. Duplicates are discarded. For example in:
|
---|
135 | * <pre><!DOCTYPE
|
---|
136 | * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
|
---|
137 | * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
|
---|
138 | * ]> <ex/></pre>
|
---|
139 | * the interface provides access to <code>foo</code>
|
---|
140 | * and the first declaration of <code>bar</code> but not the second
|
---|
141 | * declaration of <code>bar</code> or <code>baz</code>. Every node in
|
---|
142 | * this map also implements the <code>DOMEntity</code> interface.
|
---|
143 | * <br>The DOM Level 2 does not support editing entities, therefore
|
---|
144 | * <code>entities</code> cannot be altered in any way.
|
---|
145 | *
|
---|
146 | * @since DOM Level 1
|
---|
147 | */
|
---|
148 | virtual DOMNamedNodeMap *getEntities() const = 0;
|
---|
149 |
|
---|
150 |
|
---|
151 | /**
|
---|
152 | * A <code>DOMNamedNodeMap</code> containing the notations declared in the
|
---|
153 | * DTD. Duplicates are discarded. Every node in this map also implements
|
---|
154 | * the <code>DOMNotation</code> interface.
|
---|
155 | * <br>The DOM Level 2 does not support editing notations, therefore
|
---|
156 | * <code>notations</code> cannot be altered in any way.
|
---|
157 | *
|
---|
158 | * @since DOM Level 1
|
---|
159 | */
|
---|
160 | virtual DOMNamedNodeMap *getNotations() const = 0;
|
---|
161 | //@}
|
---|
162 |
|
---|
163 | /** @name Functions introduced in DOM Level 2. */
|
---|
164 | //@{
|
---|
165 | /**
|
---|
166 | * Get the public identifier of the external subset.
|
---|
167 | *
|
---|
168 | * @return The public identifier of the external subset.
|
---|
169 | * @since DOM Level 2
|
---|
170 | */
|
---|
171 | virtual const XMLCh * getPublicId() const = 0;
|
---|
172 |
|
---|
173 | /**
|
---|
174 | * Get the system identifier of the external subset.
|
---|
175 | *
|
---|
176 | * @return The system identifier of the external subset.
|
---|
177 | * @since DOM Level 2
|
---|
178 | */
|
---|
179 | virtual const XMLCh * getSystemId() const = 0;
|
---|
180 |
|
---|
181 | /**
|
---|
182 | * The internal subset as a string, or <code>null</code> if there is none.
|
---|
183 | * This is does not contain the delimiting square brackets.The actual
|
---|
184 | * content returned depends on how much information is available to the
|
---|
185 | * implementation. This may vary depending on various parameters,
|
---|
186 | * including the XML processor used to build the document.
|
---|
187 | *
|
---|
188 | * @return The internal subset as a string.
|
---|
189 | * @since DOM Level 2
|
---|
190 | */
|
---|
191 | virtual const XMLCh * getInternalSubset() const = 0;
|
---|
192 | //@}
|
---|
193 |
|
---|
194 | };
|
---|
195 |
|
---|
196 | XERCES_CPP_NAMESPACE_END
|
---|
197 |
|
---|
198 | #endif
|
---|
199 |
|
---|
200 |
|
---|