Usage: you can freely reimplement this interface.
interface CATISAXLexicalHandler
Interface to receive notification of lexical events.
This is an optional extension handler for SAX2 to provide lexical information about an XML document, such as comments and CDATA section boundaries; XML readers are not required to support this handler, and it is not part of the core SAX2 distribution.
The events in the lexical handler apply to the entire document, not just to the document element, and all lexical handler events must appear between the content handler's and events.
To set the CATISAXDeclHandler for an CATISAXXMLReader, use the method with the propertyId "http://xml.org/sax/properties/lexical-handler". If the reader does not support declaration events, it will return a error or a error when you attempt to register the handler.
public virtual Comment( | const | iComment) |
This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). Comments in the DTD must be properly nested inside / and / events (if used).
Error Class | Error Id | Description |
---|---|---|
XMLParserERR_2000 | The method can raise a CATSAXException |
public virtual EndCDATA( | ) |
Error Class | Error Id | Description |
---|---|---|
XMLParserERR_2000 | The method can raise a CATSAXException |
public virtual EndDTD( | ) |
This method is intended to report the end of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.
Error Class | Error Id | Description |
---|---|---|
XMLParserERR_2000 | The method can raise a CATSAXException |
public virtual EndEntity( | const | iName) |
Error Class | Error Id | Description |
---|---|---|
XMLParserERR_2000 | The method can raise a CATSAXException |
public virtual StartCDATA( | ) |
The contents of the CDATA section will be reported through the regular event; this event is intended only to report the boundary.
Error Class | Error Id | Description |
---|---|---|
XMLParserERR_2000 | The method can raise a CATSAXException |
public virtual StartDTD( | const | iName, |
const | iPublicId, | |
const | iSystemId) |
This method is intended to report the beginning of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.
All declarations reported through or events must appear between the and events. Declarations are assumed to belong to the internal DTD subset unless they appear between and events. Comments and processing instructions from the DTD should also be reported between the and events, in their original order of (logical) occurrence; they are not required to appear in their correct locations relative to or events, however.
Note that the / events will appear within the / events and before the first event.
Error Class | Error Id | Description |
---|---|---|
XMLParserERR_2000 | The method can raise a CATSAXException |
public virtual StartEntity( | const | iName) |
The reporting of parameter entities (including the external DTD subset) is optional, and SAX2 drivers that support may not support it; you can use the http://xml.org/sax/features/lexical-handler/parameter-entities feature to query or control the reporting of parameter entities.
General entities are reported with their regular names, parameter entities have '%' prepended to their names, and the external DTD subset has the pseudo-entity name "[dtd]".
When a SAX2 driver is providing these events, all other events must be properly nested within / events. There is no additional requirement that events from or be properly ordered.
Note that skipped entities will be reported through the event, which is part of the interface.
Because of the streaming event model that SAX uses, some entity boundaries cannot be reported under any circumstances:
These will be silently expanded, with no indication of where the original entity boundaries were.
Note also that the boundaries of character references (which are not really entities anyway) are not reported.
All / events must be properly nested.
Error Class | Error Id | Description |
---|---|---|
XMLParserERR_2000 | The method can raise a CATSAXException |
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.