3 //=============================================================================
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
9 //=============================================================================
10 #ifndef _ACEXML_DTDHANDLER_H_
11 #define _ACEXML_DTDHANDLER_H_
13 #include /**/ "ace/pre.h"
14 #include "ACEXML/common/ACEXML_Export.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "ACEXML/common/SAXExceptions.h"
23 * @class ACEXML_DTDHandler
25 * @brief ACEXML_DTDHandler
27 * If a SAX application needs information about notations and unparsed
28 * entities, then the application implements this interface and registers
29 * an instance with the SAX parser using the parser's setDTDHandler method.
30 * The parser uses the instance to report notation and unparsed entity
31 * declarations to the application.
33 * Note that this interface includes only those DTD events that the XML
34 * recommendation requires processors to report: notation and unparsed
35 * entity declarations.
37 * The SAX parser may report these events in any order, regardless of the
38 * order in which the notations and unparsed entities were declared;
39 * however, all DTD events must be reported after the document handler's
40 * startDocument event, and before the first startElement event.
42 * It is up to the application to store the information for future use
43 * (perhaps in a hash table or object tree). If the application encounters
44 * attributes of type "NOTATION", "ENTITY", or "ENTITIES", it can use the
45 * information that it obtained through this interface to find the entity
46 * and/or notation corresponding with the attribute value.
48 class ACEXML_Export ACEXML_DTDHandler
51 virtual ~ACEXML_DTDHandler ();
54 * Receive notification of a notation declaration event.
56 virtual void notationDecl (const ACEXML_Char
*name
,
57 const ACEXML_Char
*publicId
,
58 const ACEXML_Char
*systemId
) = 0;
61 * Receive notification of an unparsed entity declaration event.
63 virtual void unparsedEntityDecl (const ACEXML_Char
*name
,
64 const ACEXML_Char
*publicId
,
65 const ACEXML_Char
*systemId
,
66 const ACEXML_Char
*notationName
) = 0;
70 #include /**/ "ace/post.h"
72 #endif /* _ACEXML_DTDHANDLER_H_ */