class XMLDocumentTypeHandler

This abstract class defines the document type handler API's which can be used to process the dtd events generated by the scanner as it parses the dtd

Inheritance:


Public

Constructors and Destructor.
XMLDocumentTypeHandler ()
Default Constructor
virtual ~XMLDocumentTypeHandler ()
Destructor
The document type handler interface.
virtual void attDef ( const ElementDecl& elemDecl, const AttDef& attDef, const bool ignoring )
This method is called after the scanner has finished parsing an attribute definition
virtual void doctypeComment ( const XMLCh* const comment, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called to pass the text of the comment to the handler
virtual void doctypeDecl ( const XMLCh* const rootElemName, const XMLCh* const publicId, const XMLCh* const systemId )
This method is called to pass information found in the DOCTYPE clause in the XML file being parsed
virtual void doctypePI ( const XMLCh* const target, const XMLCh* const data, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called to pass information about the PI just parsed by the scanner
virtual void doctypeWhitespace ( const XMLCh* const chars, const unsigned int length )
This method is called to pass the white space scanned inside a DTD to the handler
virtual void elementDecl ( const ElementDecl& decl, const bool isIgnored, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called after the scanner has parsed an element definition
virtual void endAttList ( const ElementDecl& elemDecl, const unsigned int srcOfs )
This method is called at the end of parsing an ATTLIST definition in the DTD to the handler
virtual void endIntSubset ()
This method is called once the scanner hits the end of the internal subset
virtual void endExtSubset ()
This method is called once the scanner hits the end of the external subset
virtual void entityDecl ( const EntityDecl& entityDecl, const bool isPEDecl, const bool isIgnored, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called once the scanner has finished parsing an entity definition
virtual void resetDocType ()
This method is allows the doc type handler to reset itself so that it can be used again
virtual void notationDecl ( const XMLCh* const name, const XMLCh* const pubId, const XMLCh* const sysId, const bool isIgnored, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called once the scanner has finished parsing a notation declaration
virtual void startAttList ( const ElementDecl& elemDecl, const unsigned int srcOfs )
This method is called before the scanner begins to parse the ATTLIST definition in the DTD to the handler
virtual void startIntSubset ()
This method is called just before the scanner starts parsing the internal subset
virtual void startExtSubset ()
This method is called just before the scanner starts parsing the external subset
virtual void TextDecl ( const XMLCh* const versionStr, const XMLCh* const encodingStr, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called once the scanner has finished parsing a text declaration, which can be the first line in an external entity or an external subset

Documentation

This abstract class defines the document type handler API's which can be used to process the dtd events generated by the scanner as it parses the dtd.
Constructors and Destructor.

XMLDocumentTypeHandler()
Default Constructor

virtual ~XMLDocumentTypeHandler()
Destructor

The document type handler interface.

virtual void attDef( const ElementDecl& elemDecl, const AttDef& attDef, const bool ignoring )
This method is called after the scanner has finished parsing an attribute definition. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
elemDecl - The element decl object which contains this attribute
attDef - The attribute definition object just parsed.
ignoring - If true, it indicates that this definition was ignored because it was a duplicate and as per the XML spec. subsequent attribute definitions should be ignored. If false, it indicates that this definition has been added to the element.

virtual void doctypeComment( const XMLCh* const comment, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called to pass the text of the comment to the handler. Only comments found inside the DTD are returned via this callback. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
comment - The text of the comment returned as a null terminated Unicode string.

virtual void doctypeDecl( const XMLCh* const rootElemName, const XMLCh* const publicId, const XMLCh* const systemId )
This method is called to pass information found in the DOCTYPE clause in the XML file being parsed. It is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
rootElemName - The name of the root element.
publicId - The public id of the DTD file.
systemId - The system id of the DTD file.

virtual void doctypePI( const XMLCh* const target, const XMLCh* const data, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called to pass information about the PI just parsed by the scanner. Only PI's defined in the DTD are returned via this callback. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
target - The name of the target of the PI.
data - The data of the PI.

virtual void doctypeWhitespace( const XMLCh* const chars, const unsigned int length )
This method is called to pass the white space scanned inside a DTD to the handler. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
chars - The whitespace content.
length - The length of the valid data in the chars parameter.

virtual void elementDecl( const ElementDecl& decl, const bool isIgnored, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called after the scanner has parsed an element definition. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
decl - The element decl object filled with element definition information.
isIgnored - This flag indicates whether this definition was ignored or not. If true, it indicates that this was a duplication definition in the DTD and hence its ignored. When false, it indicates that the element definition will be included for further processing of the XML file.

virtual void endAttList( const ElementDecl& elemDecl, const unsigned int srcOfs )
This method is called at the end of parsing an ATTLIST definition in the DTD to the handler. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
elemDecl - The element decl object whose attributes were just defined.

virtual void endIntSubset()
This method is called once the scanner hits the end of the internal subset. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.

virtual void endExtSubset()
This method is called once the scanner hits the end of the external subset. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.

virtual void entityDecl( const EntityDecl& entityDecl, const bool isPEDecl, const bool isIgnored, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called once the scanner has finished parsing an entity definition. Both general as well as parameter entity definitions are reported back via this callback. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
entityDecl - The entity decl object
isPEDecl - If true, indicates a parameter entity definition. If false, indicates a general entity definition.
isIgnored - This flag indicates whether this definition was ignored or not. If true, it indicates that this was a duplication definition in the DTD and hence its ignored. When false, it indicates that the entity definition will be included for further processing of the XML file.

virtual void resetDocType()
This method is allows the doc type handler to reset itself so that it can be used again

virtual void notationDecl( const XMLCh* const name, const XMLCh* const pubId, const XMLCh* const sysId, const bool isIgnored, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called once the scanner has finished parsing a notation declaration. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
name - The name of the notation just parsed.
pubId - The public id for this notation.
sysId - The system id for this notation.
isIgnored - This flag indicates whether this definition was ignored or not. If true, it indicates that this was a duplication definition in the DTD and hence its ignored. When false, it indicates that this notation definition will be included for further processing of the XML file.

virtual void startAttList( const ElementDecl& elemDecl, const unsigned int srcOfs )
This method is called before the scanner begins to parse the ATTLIST definition in the DTD to the handler. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
elemDecl - The element decl object whose attributes are going to be parsed.

virtual void startIntSubset()
This method is called just before the scanner starts parsing the internal subset. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.

virtual void startExtSubset()
This method is called just before the scanner starts parsing the external subset. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.

virtual void TextDecl( const XMLCh* const versionStr, const XMLCh* const encodingStr, const unsigned int startSrcOfs, const unsigned int endSrcOfs )
This method is called once the scanner has finished parsing a text declaration, which can be the first line in an external entity or an external subset. This is an advanced callback and gets called only when advanced callbacks are enabled on the scanner.
Parameters:
versionStr - The version string found in version attribute.
encodingStr - The encoding string found in the encoding attribute.

XMLDocumentTypeHandler(const XMLDocumentTypeHandler&)
The copy constructor, you cannot call this directly

void operator=(const XMLDocumentTypeHandler&)
The assignment operator, you cannot call this directly


This class has no child classes.
Version:
Revision: 01 1.13.1.1 src/com/ibm/xml/framework/XMLDocumentTypeHandler.hpp, xml4c2Framework, xml4c2_2_x

alphabetic index hierarchy of classes


XML Parser for C++ 2.0
Copyright © IBM Corp, 1999
Center for Java Technology
10275 N. De Anza Blvd.
Cupertino CA 95014 USA
Email: xml4c@us.ibm.com

IBM Logo