Xerces 3.1.1

## org.apache.xerces.framework
Interface XMLDocumentHandler

All Known Implementing Classes:
  DOMParser, SAXParser

public interface XMLDocumentHandler

XMLValidator defines the interface that XMLDocumentScanner and XML EntityHandler have with an object that serves as a pluggable validator. This abstraction allows validators for XML grammar languages to be plugged in and queried for validity checks as the scanner processes a document.

The document scanner and entity handler need to ask the validator object for this information because the validator object is responsible for reading the grammar specification file (which contains markup declarations and entity declarations)

Version:
  $Id: XMLDocumentHandler.java,v 1.4 2000/05/26 18:59:02 andyc Exp $

Inner Class Summary
`static interface` `XMLDocumentHandler.DTDHandler`

Method Summary
`void` `characters(char[] ch, int start, int length)` callback for characters.
`void` `characters(int data)` callback for characters (string pool form).
`void` `comment(int comment)` callback for comment.
`void` `endCDATA()` callback for end of CDATA section.
`void` `endDocument()` callback for the end of document.
`void` `endElement(org.apache.xerces.utils.QName element)` callback for end of element.
`void` `endEntityReference(int entityName, int entityType, int entityContext)` callback for end of entity reference.
`void` `endNamespaceDeclScope(int prefix)` callback for the end a namespace declaration scope.
`void` `ignorableWhitespace(char[] ch, int start, int length)` callback for ignorable whitespace.
`void` `ignorableWhitespace(int data)` callback for ignorable whitespace.
`void` `processingInstruction(int target, int data)` callback for processing instruction.
`void` `startCDATA()` callback for start of CDATA section.
`void` `startDocument()` Callback for start of document If the there is no version info, encoding info, or standalone info, the corresponding argument will be set to -1.
`void` `startElement(org.apache.xerces.utils.QName element, XMLAttrList attrList, int attrListHandle)` callback for the start of element.
`void` `startEntityReference(int entityName, int entityType, int entityContext)` callback for start of entity reference.
`void` `startNamespaceDeclScope(int prefix, int uri)` callback for the start of a namespace declaration scope.
`void` `textDecl(int version, int encoding)` Signal the Text declaration of an external entity.
`void` `xmlDecl(int version, int encoding, int standalone)` Signal the XML declaration of a document

Method Detail

### startDocument

    public void startDocument()
                       throws java.lang.Exception

  Callback for start of document If the there is no version info, encoding info, or standalone info, the corresponding argument will be set to -1.
  Throws:
    java.lang.Exception -

### endDocument

    public void endDocument()
                     throws java.lang.Exception

  callback for the end of document.
  Throws:
    java.lang.Exception -

### xmlDecl

    public void xmlDecl(int version,
                        int encoding,
                        int standalone)
                 throws java.lang.Exception

  Signal the XML declaration of a document
  Parameters:
    `version` - the handle in the string pool for the version number
    `encoding` - the handle in the string pool for the encoding
    `standalong` - the handle in the string pool for the standalone value
  Throws:
    java.lang.Exception -

### textDecl

    public void textDecl(int version,
                         int encoding)
                  throws java.lang.Exception

  Signal the Text declaration of an external entity.
  Throws:
    java.lang.Exception -

### startNamespaceDeclScope

    public void startNamespaceDeclScope(int prefix,
                                        int uri)
                                 throws java.lang.Exception

  callback for the start of a namespace declaration scope.
  Parameters:
    `prefix` - string pool index of the namespace prefix being declared
    `uri` - string pool index of the namespace uri begin bound
    `java.lang.Exception` -

### endNamespaceDeclScope

    public void endNamespaceDeclScope(int prefix)
                               throws java.lang.Exception

  callback for the end a namespace declaration scope.
  Parameters:
    `prefix` - string pool index of the namespace prefix being declared
  Throws:
    java.lang.Exception -

### startElement

    public void startElement(org.apache.xerces.utils.QName element,
                             XMLAttrList attrList,
                             int attrListHandle)
                      throws java.lang.Exception

  callback for the start of element.
  Parameters:
    `elementType` - element handle for the element being scanned
    `attrList` - attrList containing the attributes of the element
    `attrListHandle` - handle into attrList. Allows attributes to be retreived.
  Throws:
    java.lang.Exception -

### endElement

    public void endElement(org.apache.xerces.utils.QName element)
                    throws java.lang.Exception

  callback for end of element.
  Parameters:
    `elementType` - element handle for the element being scanned
  Throws:
    java.lang.Exception -

### startEntityReference

    public void startEntityReference(int entityName,
                                     int entityType,
                                     int entityContext)
                              throws java.lang.Exception

  callback for start of entity reference.
  Parameters:
    `entityName` - string pool index of the entity name
    `entityType` - the XMLEntityHandler.ENTITYTYPE_* type
    `entityContext` - the XMLEntityHandler.ENTITYREF_* type for where the entity reference appears
  Throws:
    java.lang.Exception -
  See Also:
    `XMLEntityHandler`, `XMLEntityHandler`

### endEntityReference

    public void endEntityReference(int entityName,
                                   int entityType,
                                   int entityContext)
                            throws java.lang.Exception

  callback for end of entity reference.
  Parameters:
    `entityName` - string pool index of the entity anem
    `entityType` - the XMLEntityHandler.ENTITYTYPE_* type
    `entityContext` - the XMLEntityHandler.ENTITYREF_* type for where the entity reference appears
  Throws:
    java.lang.Exception -
  See Also:
    `XMLEntityHandler`, `XMLEntityHandler`

### processingInstruction

    public void processingInstruction(int target,
                                      int data)
                               throws java.lang.Exception

  callback for processing instruction.
  Parameters:
    `target` - string pool index of the PI target
    `data` - string pool index of the PI data
  Throws:
    java.lang.Exception -

### comment

    public void comment(int comment)
                 throws java.lang.Exception

  callback for comment.
  Parameters:
    `comment` - string pool index of the comment text
  Throws:
    java.lang.Exception -

### characters

    public void characters(int data)
                    throws java.lang.Exception

  callback for characters (string pool form).
  Parameters:
    `data` - string pool index of the characters that were scanned
  Throws:
    java.lang.Exception -

### characters

    public void characters(char[] ch,
                           int start,
                           int length)
                    throws java.lang.Exception

  callback for characters.
  Parameters:
    `ch` - character array containing the characters that were scanned
    `start` - offset in ch where scanned characters begin
    `length` - length of scanned characters in ch
  Throws:
    java.lang.Exception -

### ignorableWhitespace

    public void ignorableWhitespace(int data)
                             throws java.lang.Exception

  callback for ignorable whitespace.
  Parameters:
    `data` - string pool index of ignorable whitespace
  Throws:
    java.lang.Exception -

### ignorableWhitespace

    public void ignorableWhitespace(char[] ch,
                                    int start,
                                    int length)
                             throws java.lang.Exception

  callback for ignorable whitespace.
  Parameters:
    `ch` - character array containing the whitespace that was scanned
    `start` - offset in ch where scanned whitespace begins
    `length` - length of scanned whitespace in ch
  Throws:
    java.lang.Exception -

### startCDATA

    public void startCDATA()
                    throws java.lang.Exception

  callback for start of CDATA section. this callback marks the start of a CDATA section
  Throws:
    java.lang.Exception -

### endCDATA

    public void endCDATA()
                  throws java.lang.Exception

  callback for end of CDATA section. this callback marks the end of a CDATA section
  Throws:
    java.lang.Exception -

Xerces 3.1.1