IRISLIB database
ContentHandler Class Reference
Inheritance diagram for ContentHandler:
Collaboration diagram for ContentHandler:

Public Member Functions

_.Library.Status LocatePosition (_.Library.Integer Line, _.Library.Integer Offset)
 Locate the current position within the parsed document. More...
 
_.Library.Integer Mask ()
 Calculate MASK for call to xerces parser. More...
 
_.Library.Status OnPostParse ()
 Callback after XML parse complete.
 
_.Library.Status PopHandler ()
 Return to the previous handler.
 
_.Library.Status PushHandler (_.XML.SAX.ContentHandler Handler)
 Push a new handler on the stack. More...
 
 characters (_.Library.String chars, _.Library.Integer length)
 Receive notification of character data inside an element. More...
 
 comment (_.Library.String chars, _.Library.Integer length)
 Receive notification of comments. More...
 
 endCDATA ()
 Receive notification of the end of a CDATA section. More...
 
 endDTD ()
 Receive notification of the end of the DTD declarations. More...
 
 endDocument ()
 Receive notification of the end of the document. More...
 
 endElement (_.Library.String uri, _.Library.String localname, _.Library.String qname)
 Receive notification of the end of an element. More...
 
 endEntity (_.Library.String name)
 Receive notification of the end of an entity. More...
 
 endPrefixMapping (_.Library.String prefix)
 Receive notification of the end of an namespace prefix mapping. More...
 
 error (_.Library.String error)
 Receive notification of a recoverable parser error. More...
 
 fatalError (_.Library.String fatalerror)
 Report a fatal XML parsing error. More...
 
 ignorableWhitespace (_.Library.String chars, _.Library.Integer length)
 Receive notification of ignorable whitespace in element content. More...
 
 processingInstruction (_.Library.String target, _.Library.String data)
 Receive notification of a processing instruction in element content. More...
 
 skippedEntity (_.Library.String name)
 Receive notification of a skipped entity. More...
 
 startCDATA ()
 Receive notification of the start of a CDATA section. More...
 
 startDTD (_.Library.String name, _.Library.String publicId, _.Library.String systemId)
 Receive notification of the start of the DTD declarations. More...
 
 startDocument ()
 Receive notification of the beginning of the document. More...
 
 startElement (_.Library.String uri, _.Library.String localname, _.Library.String qname, _.Library.List attrs)
 Receive notification of the start of an element. More...
 
 startEntity (_.Library.String name)
 Receive notification of the start of an entity. More...
 
 startPrefixMapping (_.Library.String prefix, _.Library.String uri)
 Receive notification of the start of an namespace prefix mapping. More...
 
 warning (_.Library.String warning)
 Receive notification of a parser warning. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Additional Inherited Members

- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Detailed Description

For details on using this class, see Customizing How the SAX Parser Is Used.

This class defines the interface that a SAX document handler must implement. The SAX parser calls these methods while it parses a document. The default implementation of these methods is to do nothing; you can override these methods in a subclass to perform processing specific to your application.

Member Function Documentation

◆ LocatePosition()

_.Library.Status LocatePosition ( _.Library.Integer  Line,
_.Library.Integer  Offset 
)

Locate the current position within the parsed document.

  • Line: The current line position
  • Offset: The current line offset

Note: This method should ONLY be called during a parse, typically from the error related callbacks. Attempts to call at any other time will result in the ERROR #6019: Attempt to find location failed

◆ Mask()

Calculate MASK for call to xerces parser.

The mask is calculated from the overriden

content handling methods.

◆ PushHandler()

_.Library.Status PushHandler ( _.XML.SAX.ContentHandler  Handler)

Push a new handler on the stack.

Then all subsequent callbacks from SAX will goto this new

handler. When this handler is finished processing its piece of the XML it will call <method>PopHandler</method> which will go back to its previous handler.

◆ characters()

characters ( _.Library.String  chars,
_.Library.Integer  length 
)

Receive notification of character data inside an element.

<p>
By default, do nothing.  Application writers may override this
method to take specific actions for each chunk of character data
(such as adding the data to a node or buffer, or printing it to
a file).
</P>
<p>
<ul>
<li>chars: The characters.</li>
<li>length: The number of characters to use from the character
array.</li>
</ul>

Reimplemented in SchemaHandler, Sequencer, and Recorder.

◆ comment()

comment ( _.Library.String  chars,
_.Library.Integer  length 
)

Receive notification of comments.

<p>The Parser will call this method to report each occurence of
a comment in the XML document.</p>

<p>The application must not attempt to read from the array
outside of the specified range.</p>
<ul>
<li>chars: The characters from the XML document.</li>
<li>length: The number of characters to read from the array.</li>
</ul>
<p>
Exceptions thrown: SAXException - Any SAX exception, possibly
wrapping another exception.</p>

Reimplemented in Sequencer, and Recorder.

◆ endCDATA()

endCDATA ( )

Receive notification of the end of a CDATA section.

<p>The SAX parser will invoke this method at the end of
each CDATA parsed.</p>

<p>
Exceptions thrown: SAXException - Any SAX exception, possibly
wrapping another exception.</p>
/

Reimplemented in Sequencer, and Recorder.

◆ endDTD()

endDTD ( )

Receive notification of the end of the DTD declarations.

<p>The SAX parser will invoke this method at the end of the
DTD</p>

<p>
Exceptions thrown: SAXException - Any SAX exception, possibly
wrapping another exception.</p>
/

Reimplemented in Recorder.

◆ endDocument()

endDocument ( )

Receive notification of the end of the document.

<p>
By default, do nothing.  Application writers may override this
method in a subclass to take specific actions at the beginning
of a document (such as finalising a tree or closing an output
file).
</p>

Reimplemented in Recorder.

◆ endElement()

endElement ( _.Library.String  uri,
_.Library.String  localname,
_.Library.String  qname 
)

Receive notification of the end of an element.

<p>
By default, do nothing.  Application writers may override this
method in a subclass to take specific actions at the end of
each element (such as finalising a tree node or writing
output to a file).
</p>

<p>
<ul>
<li>uri: The URI of the associated namespace for this element</li>
<li>localname: The local part of the element name</li>
<li>qname: The QName of this element</li>
</ul>
</p>

Reimplemented in Sequencer, Recorder, and SchemaHandler.

◆ endEntity()

endEntity ( _.Library.String  name)

Receive notification of the end of an entity.

The SAX parser will invoke this method at the end of an entity

  • name: The name of the entity that is ending.

Exceptions thrown: SAXException - Any SAX exception, possibly wrapping another exception.

Reimplemented in Sequencer, and Recorder.

◆ endPrefixMapping()

endPrefixMapping ( _.Library.String  prefix)

Receive notification of the end of an namespace prefix mapping.

<p>
By default, do nothing.  Application writers may override this
method in a subclass to take specific actions at the end of
each namespace prefix mapping.</p>
</p>

<p>
<ul>
<li>prefix: The namespace prefix used</li>
</ul>
</p>

Reimplemented in SchemaHandler, Sequencer, and Recorder.

◆ error()

error ( _.Library.String  error)

Receive notification of a recoverable parser error.

<p>
The default implementation does nothing.  Application writers
may override this method in a subclass to take specific actions
for each error, such as inserting the message in a log file or
printing it to the console.
</p>

<p>
<ul>
<li>error: The error  information encoded as a string</li>
</ul>
</p>

Reimplemented in Sequencer, and Recorder.

◆ fatalError()

fatalError ( _.Library.String  fatalerror)

Report a fatal XML parsing error.

<p>
The default implementation throws an exeption
Application writers may override this method in a subclass if
they need to take specific actions for each fatal error (such as
collecting all of the errors into a single report): in any case,
the application must stop all regular processing when this
method is invoked, since the document is no longer reliable, and
the parser may no longer report parsing events.
</p>
<p>
<ul>
<li>fatalerror: The error information encoded as a string</li>
</ul>
</p>

Reimplemented in Sequencer, and Recorder.

◆ ignorableWhitespace()

ignorableWhitespace ( _.Library.String  chars,
_.Library.Integer  length 
)

Receive notification of ignorable whitespace in element content.

<p>
By default, do nothing.  Application writers may override this
method to take specific actions for each chunk of ignorable
whitespace (such as adding data to a node or buffer, or printing
it to a file).
</p>

<p>
<ul>
<li>chars: The whitespace characters.</li>
<li>length: The number of characters to use from the  character
array.</li>
</ul>
</p>

Reimplemented in Sequencer, and Recorder.

◆ processingInstruction()

processingInstruction ( _.Library.String  target,
_.Library.String  data 
)

Receive notification of a processing instruction in element content.

<p>
Application writers may override this method in a subclass if
they need to take specific actions for processing instruction.
</p>
<p>
<ul>
<li>target: The target of the processing instruction</li>
<li>data: The associated data</li>
</ul>
</p>

Reimplemented in Sequencer, and Recorder.

◆ skippedEntity()

skippedEntity ( _.Library.String  name)

Receive notification of a skipped entity.

<p>
The parser will invoke this method once for each entity
skipped.  All processors may skip external entities,
depending on the values of the features:
</p>
<p>
http://xml.org/sax/features/external-general-entities<br>
http://xml.org/sax/features/external-parameter-entities
</p>

<p>
Introduced with SAX2
</p>

<p>
<ul>
<li>name: The name of the skipped entity.
If it is a parameter entity,
the name will begin with %, and if it is the external DTD subset,
it will be the string [dtd].</li>
</ul>
</p>

Reimplemented in Recorder.

◆ startCDATA()

startCDATA ( )

Receive notification of the start of a CDATA section.

<p>The SAX parser will invoke this method at the start of
each CDATA parsed.</p>

<p>
Exceptions thrown: SAXException - Any SAX exception, possibly
wrapping another exception.</p>

Reimplemented in Sequencer, and Recorder.

◆ startDTD()

startDTD ( _.Library.String  name,
_.Library.String  publicId,
_.Library.String  systemId 
)

Receive notification of the start of the DTD declarations.

<p>The SAX parser will invoke this method at the start of the
DTD</p>
<ul>
<li>name: The document type name.</li>
<li>publicId: The declared public identifier for the external DTD subset, or null if none was declared.</li>
<li>systemId: The declared system identifier for the external DTD
subset, or null if none was declared.</li>
</ul>
<p>
Exceptions thrown: SAXException - Any SAX exception, possibly
wrapping another exception.</p>

Reimplemented in Recorder.

◆ startDocument()

startDocument ( )

Receive notification of the beginning of the document.

<p>
By default, do nothing.  Application writers may override this
method in a subclass to take specific actions at the beginning
of a document (such as allocating the root node of a tree or 
creating an output file)
<p>

Reimplemented in SchemaHandler, Sequencer, and Recorder.

◆ startElement()

startElement ( _.Library.String  uri,
_.Library.String  localname,
_.Library.String  qname,
_.Library.List  attrs 
)

Receive notification of the start of an element.

<p>
By default, do nothing.  Application writers may override this
method in a subclass to take specific actions at the start of
each element (such as allocating a new tree node or writin
output to a file).
</p>
<p>
<ul>
<li>uri: The URI of the associated namespace for this element</li>
<li>localname: the local part of the element name</li>
<li>qname: the QName of this element</li>
<li>attrs: a list in <a target="_top" href="/csp/docbook/Doc.View.cls?FIND=OBJECTSCRIPT+$LIST+FUNCTION">$List</a> format consisting of a repeating group of attributes.</li>
</ul>
<p>
The format of the repeating group is as follows:
<ul>
<li>+0 - uri: The URI of the associated namespace for this attribute</li>
<li>+1 - localname: The local part of the name of this attribute</li>
<li>+2 - qname: The QName of this attribute</li>
<li>+3 - type: The type of this attribute ("CDATA", NMTOKEN", "ENTITY", etc.)</li>
<li>+4 - value: The value of this attribute</li>
</ul>
</p>

Reimplemented in Sequencer, Recorder, and SchemaHandler.

◆ startEntity()

startEntity ( _.Library.String  name)

Receive notification of the start of an entity.

<p>The SAX parser will invoke this method at the start of an
entity</p>
<ul>
<li>name: The name of the entity that is starting.</li>
</ul>
<p>
Exceptions thrown: SAXException - Any SAX exception, possibly
wrapping another exception.</p>

Reimplemented in Sequencer, and Recorder.

◆ startPrefixMapping()

startPrefixMapping ( _.Library.String  prefix,
_.Library.String  uri 
)

Receive notification of the start of an namespace prefix mapping.

<p>
By default, do nothing.  Application writers may override this
method in a subclass to take specific actions at the start of
each namespace prefix mapping.
</p>

<p>
<ul>
<li>prefix: The namespace prefix used</li>
<li>uri: The namespace URI used.</li>
</ul>
</p>

Reimplemented in SchemaHandler, Sequencer, and Recorder.

◆ warning()

warning ( _.Library.String  warning)

Receive notification of a parser warning.

The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each warning, such as inserting the message in a log file or printing it to the console.

  • warning: The warning information encoded as a string

Reimplemented in Sequencer, and Recorder.