Cross-Platform C++

ot::sax
class DTDHandler  (abstract)

#include "ot/sax/DTDHandler.h"

ot::ManagedObject ot::sax::DefaultHandler Receive notification of basic DTD-related events.

If a SAX application needs information about notations and unparsed entities, then the application implements this interface and registers an instance with the XMLReader using the XMLReader::setDTDHandler() method. The parser uses the instance to report notation and unparsed entity declarations to the application.

Note that this interface includes only those DTD events that the XML recommendation requires processors to report: notation and unparsed entity declarations.

The SAX parser may report these events in any order, regardless of the order in which the notations and unparsed entities were declared; however, all DTD events must be reported after the document handler's startDocument event, and before the first startElement event.

It is up to the application to store the information for future use. If the application encounters attributes of type "NOTATION", "ENTITY", or "ENTITIES", it can use the information that it obtained through this interface to find the entity and/or notation corresponding with the attribute value.

See also:
XMLReader::setDTDHandler()



Method Summary
 virtual void notationDecl(const String& name, const String& publicId, const String& systemId)=0
         Receive notification of a notation declaration event.
 virtual void unparsedEntityDecl(const String& name, const String& publicId, const String& systemId, const String& notationName)=0
         Receive notification of an unparsed entity declaration event.

Methods inherited from class ot::ManagedObject
addRef, getRefCount, onFinalRelease, operator=, release

Method Detail

notationDecl

virtual void notationDecl(const String& name,
                          const String& publicId,
                          const String& systemId)=0
Receive notification of a notation declaration event.

It is up to the application to record the notation for later reference, if necessary.

At least one of publicId and systemId must be present. If a system identifier is present, and it is a URL, it will be fully resolved if the http://elcel.com/opentop/sax/features/resolve-entity-uris feature is set to true (the default).

There is no guarantee that the notation declaration will be reported before any unparsed entities that use it.

Parameters:
name - The notation name.
publicId - The notation's public identifier, or the empty string if none was given.
systemId - The notation's system identifier, or the empty string if none was given.
Exceptions:
SAXException - The application may throw an exception during processing. If so, the SAX XML parser will stop parsing the current document.
See also:
unparsedEntityDecl() , Attributes

unparsedEntityDecl

virtual void unparsedEntityDecl(const String& name,
                                const String& publicId,
                                const String& systemId,
                                const String& notationName)=0
Receive notification of an unparsed entity declaration event.

Note that the notation name corresponds to a notation reported by the notationDecl() event. It is up to the application to record the entity for later reference, if necessary.

If the system identifier is a URL, it will be fully resolved if the http://elcel.com/opentop/sax/features/resolve-entity-uris feature is set to true (the default).

Parameters:
name - The unparsed entity's name.
publicId - The entity's public identifier, or the empty string if none was given.
systemId - The entity's system identifier.
notationName - The name of the associated notation.
Exceptions:
SAXException - The application may throw an exception during processing. If so, the SAX XML parser will stop parsing the current document.
See also:
notationDecl() , Attributes


Cross-Platform C++

Found a bug or missing feature? Please email us at support@elcel.com

Copyright © 2000-2003 ElCel Technology   Trademark Acknowledgements