1 | #ifndef DOMDocumentType_HEADER_GUARD_
|
---|
2 | #define DOMDocumentType_HEADER_GUARD_
|
---|
3 |
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright 2001-2002,2004 The Apache Software Foundation.
|
---|
7 | *
|
---|
8 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
9 | * you may not use this file except in compliance with the License.
|
---|
10 | * You may obtain a copy of the License at
|
---|
11 | *
|
---|
12 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
13 | *
|
---|
14 | * Unless required by applicable law or agreed to in writing, software
|
---|
15 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
17 | * See the License for the specific language governing permissions and
|
---|
18 | * limitations under the License.
|
---|
19 | */
|
---|
20 |
|
---|
21 | /*
|
---|
22 | * $Id: DOMDocumentType.hpp,v 1.9 2004/09/26 15:38:02 gareth Exp $
|
---|
23 | */
|
---|
24 |
|
---|
25 | #include <xercesc/util/XercesDefs.hpp>
|
---|
26 | #include <xercesc/dom/DOMNode.hpp>
|
---|
27 |
|
---|
28 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
29 |
|
---|
30 |
|
---|
31 | class 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 | */
|
---|
45 | class CDOM_EXPORT DOMDocumentType: public DOMNode {
|
---|
46 | protected:
|
---|
47 | // -----------------------------------------------------------------------
|
---|
48 | // Hidden constructors
|
---|
49 | // -----------------------------------------------------------------------
|
---|
50 | /** @name Hidden constructors */
|
---|
51 | //@{
|
---|
52 | DOMDocumentType() {};
|
---|
53 | //@}
|
---|
54 |
|
---|
55 | private:
|
---|
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 |
|
---|
65 | public:
|
---|
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><!DOCTYPE<br>
|
---|
96 | * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar<br>
|
---|
97 | * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz"><br>
|
---|
98 | * ]> <ex/><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 |
|
---|
156 | XERCES_CPP_NAMESPACE_END
|
---|
157 |
|
---|
158 | #endif
|
---|
159 |
|
---|
160 |
|
---|