org.exolab.adaptx.xslt.util

Class SAX2ResultHandler

Implemented Interfaces:
ContentHandler, DocumentHandler, LexicalHandler

public class SAX2ResultHandler
extends java.lang.Object
implements ContentHandler, DocumentHandler, LexicalHandler

A SAX 1.0 and 2.0 adapter for the source tree
Version:
$Revision: 3953 $ $Date: 2003-10-07 04:35:23 -0400 (Tue, 07 Oct 2003) $
Author:
Keith Visco

Constructor Summary

SAX2ResultHandler(ResultHandler handler)
Creates a new SAX2ResultHandler

Method Summary

void
characters(char[] chars, int start, int length)
Signals the start of characters
void
comment(char[] ch, int start, int length)
Signals the start of a comment
void
endCDATA()
Signals and end to CDATA section
void
endDTD()
Signals the end of the DTD internal subset
void
endDocument()
Signals the end of the document
void
endElement(String name)
DocumentHandler#endElement Signals the end of an element
void
endElement(String namespaceURI, String localName, String qName)
ContentHandler#endElement Signals the end of an element
void
endEntity(String name)
Signals the end of an Entity
void
endPrefixMapping(String prefix)
Signals to end the namespace prefix mapping
void
ignorableWhitespace(char[] chars, int start, int length)
Signals the start of ignorable whitespace characters
void
processingInstruction(String target, String data)
Signals to recieve a processing instruction
void
setDocumentLocator(Locator locator)
Sets the document locator
void
skippedEntity(String name)
Signals that an entity was skipped by the parser
void
startCDATA()
Signals the start of a CDATA section
void
startDTD(String name, String publicId, String systemId)
Signals the start of the DTD internal subset
void
startDocument()
Signals the start of a document
void
startElement(String name, AttributeList atts)
DocumentHandler#startElement Signals the start of element
void
startElement(String namespaceURI, String localName, String qName, Attributes atts)
ContentHandler#startElement Signals the start of element
void
startEntity(String name)
Signals the start of an Entity
void
startPrefixMapping(String prefix, String uri)
Signals to start the namespace - prefix mapping

Constructor Details

SAX2ResultHandler

public SAX2ResultHandler(ResultHandler handler)
Creates a new SAX2ResultHandler

Method Details

characters

public void characters(char[] chars,
                       int start,
                       int length)
            throws org.xml.sax.SAXException
Signals the start of characters
Parameters:
chars - the character array containing the characters to receive
start - the index into the character array to start receiving characters at
length - the number of characters to recieve

comment

public void comment(char[] ch,
                    int start,
                    int length)
            throws SAXException
Signals the start of a comment

endCDATA

public void endCDATA()
            throws SAXException
Signals and end to CDATA section

endDTD

public void endDTD()
            throws SAXException
Signals the end of the DTD internal subset

endDocument

public void endDocument()
            throws org.xml.sax.SAXException
Signals the end of the document

endElement

public void endElement(String name)
            throws org.xml.sax.SAXException
DocumentHandler#endElement Signals the end of an element
Parameters:
name - the name of the element

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
            throws org.xml.sax.SAXException
ContentHandler#endElement Signals the end of an element
Parameters:

endEntity

public void endEntity(String name)
            throws SAXException
Signals the end of an Entity

endPrefixMapping

public void endPrefixMapping(String prefix)
            throws SAXException
Signals to end the namespace prefix mapping
Parameters:
prefix - the namespace prefix

ignorableWhitespace

public void ignorableWhitespace(char[] chars,
                                int start,
                                int length)
            throws org.xml.sax.SAXException
Signals the start of ignorable whitespace characters
Parameters:
chars - the character array containing the characters to receive
start - the index into the character array to start receiving characters at
length - the number of characters to recieve

processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws org.xml.sax.SAXException
Signals to recieve a processing instruction
Parameters:
target - the target of the processing instruction
data - the content of the processing instruction

setDocumentLocator

public void setDocumentLocator(Locator locator)
Sets the document locator
Parameters:
locator - the Locator used by this DocumentHandler

skippedEntity

public void skippedEntity(String name)
            throws SAXException
Signals that an entity was skipped by the parser
Parameters:
name - the skipped entity's name

startCDATA

public void startCDATA()
            throws SAXException
Signals the start of a CDATA section

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
            throws SAXException
Signals the start of the DTD internal subset

startDocument

public void startDocument()
            throws SAXException
Signals the start of a document

startElement

public void startElement(String name,
                         AttributeList atts)
            throws org.xml.sax.SAXException
DocumentHandler#startElement Signals the start of element
Parameters:
name - the name of the element
atts - the AttributeList containing the associated attributes for the element

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
            throws org.xml.sax.SAXException
ContentHandler#startElement Signals the start of element
Parameters:
atts - the AttributeList containing the associated attributes for the element

startEntity

public void startEntity(String name)
            throws SAXException
Signals the start of an Entity

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
            throws SAXException
Signals to start the namespace - prefix mapping
Parameters:
prefix - the namespace prefix to map
uri - the namespace URI