org.exolab.adaptx.xslt.handlers

Class DefaultHandler

public class DefaultHandler extends Object implements ContentHandler, ResultHandler

The default implementation of ResultHandler. It uses the Apache Serializer classes written by my friend and colleague Assaf Arkin.

Version: $Revision: 4774 $ $Date: 2004-09-28 15:28:19 -0400 (Tue, 28 Sep 2004) $

Author: Keith Visco

Constructor Summary
DefaultHandler(Writer out)
Creates a new DefaultHandler
DefaultHandler(OutputStream out)
Creates a new DefaultHandler
DefaultHandler(Writer out, OutputFormat format)
Creates a new DefaultHandler
DefaultHandler(OutputStream out, OutputFormat format)
Creates a new DefaultHandler
Method Summary
voidcdata(char[] chars, int start, int length)
Signals to receive CDATA characters
voidcharacters(char[] chars, int start, int length)
Signals the start of characters
voidcomment(String data)
voidendDocument()
Signals the end of the document
voidendElement(String name)
Signals the start of element
voidendElement(String namespaceURI, String localName, String qName)

ContentHandler#endElement

Signals the end of an element
voidendPrefixMapping(String prefix)
Signals to end the namespace prefix mapping
voidentityReference(String name)
Signals to recieve an entity reference with the given name
voidignorableWhitespace(char[] chars, int start, int length)
Signals the start of ignorable whitespace characters
voidprocessingInstruction(String target, String data)
Signals to recieve a processing instruction
voidsetDocumentLocator(Locator locator)
Sets the document locator
voidsetIndentSize(short indentSize)
Sets the indent size for all formatters that perform serialization, in which indentation is applicable.
voidsetOutputFormat(OutputFormat format)
Sets the output format information for Formatters that perform serialization.
voidskippedEntity(String name)
Signals that an entity was skipped by the parser
voidstartDocument()
Signals the start of a document
voidstartElement(String name, AttributeList atts)
Signals the start of element
voidstartElement(String namespaceURI, String localName, String qName, Attributes atts)

ContentHandler#startElement

Signals the start of element
voidstartPrefixMapping(String prefix, String uri)
Signals to start the namespace - prefix mapping
voidunescapedCharacters(char[] chars, int start, int length)
Signals to receive characters which should not be escaped

Constructor Detail

DefaultHandler

public DefaultHandler(Writer out)
Creates a new DefaultHandler

DefaultHandler

public DefaultHandler(OutputStream out)
Creates a new DefaultHandler

DefaultHandler

public DefaultHandler(Writer out, OutputFormat format)
Creates a new DefaultHandler

DefaultHandler

public DefaultHandler(OutputStream out, OutputFormat format)
Creates a new DefaultHandler

Method Detail

cdata

public void cdata(char[] chars, int start, int length)
Signals to receive CDATA 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

characters

public void characters(char[] chars, int start, int length)
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(String data)

endDocument

public void endDocument()
Signals the end of the document

endElement

public void endElement(String name)
Signals the start of element

Parameters: name the name of the element atts the AttributeList containing the associated attributes for the element

endElement

public void endElement(String namespaceURI, String localName, String qName)

ContentHandler#endElement

Signals the end of an element

Parameters: name the name of the element

endPrefixMapping

public void endPrefixMapping(String prefix)
Signals to end the namespace prefix mapping

Parameters: prefix the namespace prefix

entityReference

public void entityReference(String name)
Signals to recieve an entity reference with the given name

Parameters: name the name of the entity reference

ignorableWhitespace

public void ignorableWhitespace(char[] chars, int start, int length)
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)
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

setIndentSize

public void setIndentSize(short indentSize)
Sets the indent size for all formatters that perform serialization, in which indentation is applicable.

Parameters: indentSize the number of characters to indent

setOutputFormat

public void setOutputFormat(OutputFormat format)
Sets the output format information for Formatters that perform serialization.

Parameters: format the OutputFormat used to specify properties during serialization

skippedEntity

public void skippedEntity(String name)
Signals that an entity was skipped by the parser

Parameters: name the skipped entity's name

startDocument

public void startDocument()
Signals the start of a document

startElement

public void startElement(String name, AttributeList atts)
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)

ContentHandler#startElement

Signals the start of element

Parameters: name the name of the element atts the AttributeList containing the associated attributes for the element

startPrefixMapping

public void startPrefixMapping(String prefix, String uri)
Signals to start the namespace - prefix mapping

Parameters: prefix the namespace prefix to map uri the namespace URI

unescapedCharacters

public void unescapedCharacters(char[] chars, int start, int length)
Signals to receive characters which should not be escaped

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