Unicorn XML Toolkit
Version 1.00.00

Namespace Sax
Class CDtdHandler

class CDtdHandler: virtual public CInterface {
public:
    CDtdHandler();
    virtual ~CDtdHandler();
public:
    virtual void NotationDecl(
        const CString &strName,
        const CString &strPublicId,
        const CString &strSystemId) = 0;
    virtual void UnparsedEntityDecl(
        const CString &strName,
        const CString &strPublicId,
        const CString &strSystemId,
        const CString &strNotationName) = 0;
    };

The interface for receiving 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 SAX reader using the reader's CXmlReader::SetDtdHandler method. The reader 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 reader 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 CDocumentHandler::StartDocument event, and before the first CDocumentHandler::StartElement event.

It is up to the application to store the information for future use (perhaps in a hash table or object tree). 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.

Since:
1.00.00
Version:
1.00.00
Author:
C++ interfaces by Alexey Gokhberg; based on the original SAX2 specification by David Megginson
Constructor/Destructor Summary
CDtdHandler ();
����������Constructs the DTD handler.
~CDtdHandler ();
����������Destroys the DTD handler.

Function Summary
void NotationDecl (const CString &strName, const CString &strPublicId, const CString &strSystemId);
����������Receives notification of a notation declaration event.
void UnparsedEntityDecl (const CString &strName, const CString &strPublicId, const CString &strSystemId, const CString &strNotationName);
����������Receives notification of an unparsed entity declaration event.

Constructor/Destructor Detail

CDtdHandler

CDtdHandler();

Constructs the DTD handler.

~CDtdHandler

virtual ~CDtdHandler();

Destroys the DTD handler.

Function Detail

NotationDecl

virtual void NotationDecl(
    const CString &strName,
    const CString &strPublicId,
    const CString &strSystemId) = 0;

Receives 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 public identifier and system identifier must be non-empty. If a system identifier is present, and it is a URL, the SAX reader must resolve it fully before passing it to the application through this event.

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

Parameters:
strName - the notation name
strPublicId - the notation's public identifier, or the empty string if none was given
strSystemId - the notation's system identifier, or the empty string if none was given

UnparsedEntityDecl

virtual void UnparsedEntityDecl(
    const CString &strName,
    const CString &strPublicId,
    const CString &strSystemId,
    const CString &strNotationName) = 0;

Receives 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, the reader must resolve it fully before passing it to the application.

Parameters:
strName - the unparsed entity's name
strPublicId - the entity's public identifier, or the empty string if none was given
strSystemId - the entity's system identifier
strNotationName - the name of the associated notation

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.