source: NonGTP/Xerces/xerces/include/xercesc/sax/DTDHandler.hpp @ 358

Revision 358, 5.8 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 1999-2000,2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * $Log: DTDHandler.hpp,v $
19 * Revision 1.5  2004/09/08 13:56:19  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.4  2003/03/07 18:10:06  tng
23 * Return a reference instead of void for operator=
24 *
25 * Revision 1.3  2002/11/04 14:56:25  tng
26 * C++ Namespace Support.
27 *
28 * Revision 1.2  2002/02/20 18:17:01  tng
29 * [Bug 5977] Warnings on generating apiDocs.
30 *
31 * Revision 1.1.1.1  2002/02/01 22:22:08  peiyongz
32 * sane_include
33 *
34 * Revision 1.5  2000/02/24 20:12:54  abagchi
35 * Swat for removing Log from API docs
36 *
37 * Revision 1.4  2000/02/12 03:31:55  rahulj
38 * Removed duplicate CVS Log entries.
39 *
40 * Revision 1.3  2000/02/12 01:27:19  aruna1
41 * Documentation updated
42 *
43 * Revision 1.2  2000/02/06 07:47:57  rahulj
44 * Year 2K copyright swat.
45 *
46 * Revision 1.1.1.1  1999/11/09 01:07:44  twl
47 * Initial checkin
48 *
49 * Revision 1.2  1999/11/08 20:44:54  rahul
50 * Swat for adding in Product name and CVS comment log variable.
51 *
52 */
53
54
55#ifndef DTDHANDLER_HPP
56#define DTDHANDLER_HPP
57
58#include <xercesc/util/XercesDefs.hpp>
59
60XERCES_CPP_NAMESPACE_BEGIN
61
62/**
63  * Receive notification of basic DTD-related events.
64  *
65  * <p>If a SAX application needs information about notations and
66  * unparsed entities, then the application implements this
67  * interface and registers an instance with the SAX parser using
68  * the parser's setDTDHandler method.  The parser uses the
69  * instance to report notation and unparsed entity declarations to
70  * the application.</p>
71  *
72  * <p>The SAX parser may report these events in any order, regardless
73  * of the order in which the notations and unparsed entities were
74  * declared; however, all DTD events must be reported after the
75  * document handler's startDocument event, and before the first
76  * startElement event.</p>
77  *
78  * <p>It is up to the application to store the information for
79  * future use (perhaps in a hash table or object tree).
80  * If the application encounters attributes of type "NOTATION",
81  * "ENTITY", or "ENTITIES", it can use the information that it
82  * obtained through this interface to find the entity and/or
83  * notation corresponding with the attribute value.</p>
84  *
85  * <p>The HandlerBase class provides a default implementation
86  * of this interface, which simply ignores the events.</p>
87  *
88  * @see Parser#setDTDHandler
89  * @see HandlerBase#HandlerBase
90  */
91
92class SAX_EXPORT DTDHandler
93{
94public:
95    /** @name Constructors and Destructor */
96    //@{
97    /** Default Constructor */
98    DTDHandler()
99    {
100    }
101
102    /** Destructor */
103    virtual ~DTDHandler()
104    {
105    }
106
107    //@}
108
109    /** @name The DTD handler interface */
110    //@{
111  /**
112    * Receive notification of a notation declaration event.
113    *
114    * <p>It is up to the application to record the notation for later
115    * reference, if necessary.</p>
116    *
117    * <p>If a system identifier is present, and it is a URL, the SAX
118    * parser must resolve it fully before passing it to the
119    * application.</p>
120    *
121    * @param name The notation name.
122    * @param publicId The notation's public identifier, or null if
123    *        none was given.
124    * @param systemId The notation's system identifier, or null if
125    *        none was given.
126    * @exception SAXException Any SAX exception, possibly
127    *            wrapping another exception.
128    * @see #unparsedEntityDecl
129    * @see AttributeList#AttributeList
130    */
131        virtual void notationDecl
132    (
133        const   XMLCh* const    name
134        , const XMLCh* const    publicId
135        , const XMLCh* const    systemId
136    ) = 0;
137
138  /**
139    * Receive notification of an unparsed entity declaration event.
140    *
141    * <p>Note that the notation name corresponds to a notation
142    * reported by the notationDecl() event.  It is up to the
143    * application to record the entity for later reference, if
144    * necessary.</p>
145    *
146    * <p>If the system identifier is a URL, the parser must resolve it
147    * fully before passing it to the application.</p>
148    *
149    * @exception SAXException Any SAX exception, possibly
150    *            wrapping another exception.
151    * @param name The unparsed entity's name.
152    * @param publicId The entity's public identifier, or null if none
153    *        was given.
154    * @param systemId The entity's system identifier (it must always
155    *        have one).
156    * @param notationName The name of the associated notation.
157    * @see #notationDecl
158    * @see AttributeList#AttributeList
159    */
160    virtual void unparsedEntityDecl
161    (
162        const   XMLCh* const    name
163        , const XMLCh* const    publicId
164        , const XMLCh* const    systemId
165        , const XMLCh* const    notationName
166    ) = 0;
167
168    /**
169    * Reset the DocType object on its reuse
170    *
171    * <p>This method helps in reseting the DTD object implementational
172    * defaults each time the DTD is begun.</p>
173    *
174    */
175    virtual void resetDocType() = 0;
176
177    //@}
178
179private :
180    /* Unimplemented constructors and operators */
181
182    /* Copy constructor */
183    DTDHandler(const DTDHandler&);
184
185    /* Assignment operator */
186    DTDHandler& operator=(const DTDHandler&);
187
188};
189
190XERCES_CPP_NAMESPACE_END
191
192#endif
Note: See TracBrowser for help on using the repository browser.