Xerces-C++  3.1.3
List of all members
DeclHandler Class Referenceabstract

Receive notification of DTD declaration events. More...

Inheritance diagram for DeclHandler:
DefaultHandler

Public Member Functions

Constructors and Destructor
 DeclHandler ()
 Default constructor. More...
 
virtual ~DeclHandler ()
 Destructor. More...
 
The virtual declaration handler interface
virtual void elementDecl (const XMLCh *const name, const XMLCh *const model)=0
 Report an element type declaration. More...
 
virtual void attributeDecl (const XMLCh *const eName, const XMLCh *const aName, const XMLCh *const type, const XMLCh *const mode, const XMLCh *const value)=0
 Report an attribute type declaration. More...
 
virtual void internalEntityDecl (const XMLCh *const name, const XMLCh *const value)=0
 Report an internal entity declaration. More...
 
virtual void externalEntityDecl (const XMLCh *const name, const XMLCh *const publicId, const XMLCh *const systemId)=0
 Report a parsed external entity declaration. More...
 

Detailed Description

Receive notification of DTD declaration events.

This is an optional extension handler for SAX2 to provide more complete information about DTD declarations in an XML document. XML readers are not required to recognize this handler, and it is not part of core-only SAX2 distributions.

Note that data-related DTD declarations (unparsed entities and notations) are already reported through the DTDHandler interface.

If you are using the declaration handler together with a lexical handler, all of the events will occur between the startDTD and the endDTD events.

See also
SAX2XMLReader::setLexicalHandler
SAX2XMLReader::setDeclarationHandler

Constructor & Destructor Documentation

DeclHandler::DeclHandler ( )

Default constructor.

virtual DeclHandler::~DeclHandler ( )
virtual

Destructor.

Member Function Documentation

virtual void DeclHandler::attributeDecl ( const XMLCh *const  eName,
const XMLCh *const  aName,
const XMLCh *const  type,
const XMLCh *const  mode,
const XMLCh *const  value 
)
pure virtual

Report an attribute type declaration.

The Parser will call this method to report each occurrence of a comment in the XML document.

The application must not attempt to read from the array outside of the specified range.

Parameters
eNameThe name of the associated element.
aNameThe name of the attribute.
typeA string representing the attribute type.
modeA string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies.
valueA string representing the attribute's default value, or null if there is none.
Exceptions
SAXExceptionAny SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

virtual void DeclHandler::elementDecl ( const XMLCh *const  name,
const XMLCh *const  model 
)
pure virtual

Report an element type declaration.

The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, optionally followed by an occurrence indicator. The model will be normalized so that all parameter entities are fully resolved and all whitespace is removed,and will include the enclosing parentheses. Other normalization (such as removing redundant parentheses or simplifying occurrence indicators) is at the discretion of the parser.

Parameters
nameThe element type name.
modelThe content model as a normalized string.
Exceptions
SAXExceptionAny SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

virtual void DeclHandler::externalEntityDecl ( const XMLCh *const  name,
const XMLCh *const  publicId,
const XMLCh *const  systemId 
)
pure virtual

Report a parsed external entity declaration.

Only the effective (first) declaration for each entity will be reported.

Parameters
nameThe name of the entity. If it is a parameter entity, the name will begin with ''.
publicIdThe The declared public identifier of the entity, or null if none was declared.
systemIdThe declared system identifier of the entity.
Exceptions
SAXExceptionAny SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.

virtual void DeclHandler::internalEntityDecl ( const XMLCh *const  name,
const XMLCh *const  value 
)
pure virtual

Report an internal entity declaration.

Only the effective (first) declaration for each entity will be reported. All parameter entities in the value will be expanded, but general entities will not.

Parameters
nameThe name of the entity. If it is a parameter entity, the name will begin with ''.
valueThe replacement text of the entity.
Exceptions
SAXExceptionAny SAX exception, possibly wrapping another exception.

Implemented in DefaultHandler.


The documentation for this class was generated from the following file: