Unicorn XML Toolkit
Version 1.00.00

Namespace Sxp
Class IDtdHandler

class IDtdHandler: public CInterface {
public:
    enum {
        CDATA,
        ID,
        IDREF,
        IDREFS,
        ENTITY,
        ENTITIES,
        NMTOKEN,
        NMTOKENS,
        NOTATION,
        ENUMERATION
        };
    enum {
        REQUIRED,
        IMPLIED,
        FIXED,
        DEFAULT
        };
public:
    virtual ~IDtdHandler();
public:
    virtual void AttributeDecl(
        const CString &strElementName,
        const CString &strAttributeName,
        int nType,
        int nDefaultType,
        const CString &strDefaultValue) = 0;
    virtual void UnparsedEntityDecl(
        const CString &strName,
        const CString &strPublicId,
        const CString &strSystemId,
        const CString &strNotationName) = 0;
    virtual void NotationDecl(
        const CString &strName,
        const CString &strPublicId,
        const CString &strSystemId) = 0;
    };

The abstract interface for receiving notifications of basic DTD-related events.

If an SXP application needs information about attributes, notations, or unparsed entities, then the application implements this interface and registers an instance with the SXP parser using the parser's IParser::SetDtdHandler method. The parser uses the instance to report attributes, notation, and unparsed entity declarations to the application.

The SXP parser may report these events in any order, regardless the order in which the attributes, notations, and unparsed entities were declared; however, all DTD events must be reported after the document handler's IDocumentHandler::StartDocument event, and before the first IDocumentHandler::StartElement event.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
~IDtdHandler ();
����������Destroys the DTD handler.

Function Summary
void AttributeDecl (const CString &strElementName, const CString &strAttributeName, int nType, int nDefaultType, const CString &strDefaultValue);
����������Receives notification of an attribute declaration event.
void UnparsedEntityDecl (const CString &strName, const CString &strPublicId, const CString &strSystemId, const CString &strNotationName);
����������Receives notification of an unparsed entity declaration event.
void NotationDecl (const CString &strName, const CString &strPublicId, const CString &strSystemId);
����������Receives notification of a notation declaration event.

Constructor/Destructor Detail

~IDtdHandler

virtual ~IDtdHandler();

Destroys the DTD handler.

Function Detail

AttributeDecl

virtual void AttributeDecl(
    const CString &strElementName,
    const CString &strAttributeName,
    int nType,
    int nDefaultType,
    const CString &strDefaultValue) = 0;

Receives notification of an attribute declaration event.

Allowed values for the attribute type are IDtdHandler::CDATA , IDtdHandler::ID , IDtdHandler::IDREF , IDtdHandler::IDREFS , IDtdHandler::ENTITY , IDtdHandler::ENTITIES , IDtdHandler::NMTOKEN , IDtdHandler::NMTOKENS , IDtdHandler::NOTATION , and IDtdHandler::ENUMERATION .

Allowed values for the attribute's default value semantics are IDtdHandler::REQUIRED , IDtdHandler::IMPLIED , IDtdHandler::FIXED , and IDtdHandler::DEFAULT .

Parameters:
strElementName - the name of the owner element
strAttributeName - the attribute name
nType - the attribute type
nDefaultType - the attribute's default value semantics
strDefaultType - the attribute's default value, or the empty string of none was declared

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.

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

NotationDecl

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

Receives notification of a notation declaration event.

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

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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