Class DefaultHandler
java.lang.Object
org.exolab.adaptx.xslt.handlers.DefaultHandler
- All Implemented Interfaces:
ResultHandler, ContentHandler, DocumentHandler
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 21:28:19 +0200 (Tue, 28 Sep 2004) $
- Author:
- Keith Visco
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DefaultHandlerDefaultHandler(OutputStream out, OutputFormat format) Creates a new DefaultHandlerDefaultHandler(Writer out) Creates a new DefaultHandlerDefaultHandler(Writer out, OutputFormat format) Creates a new DefaultHandler -
Method Summary
Modifier and TypeMethodDescriptionvoidcdata(char[] chars, int start, int length) Signals to receive CDATA charactersvoidcharacters(char[] chars, int start, int length) Signals the start of charactersvoidSignals to recieve a commentvoidSignals the end of the documentvoidendElement(String name) Signals the start of elementvoidendElement(String namespaceURI, String localName, String qName) ContentHandler#endElementvoidendPrefixMapping(String prefix) Signals to end the namespace prefix mappingvoidentityReference(String name) Signals to recieve an entity reference with the given namevoidignorableWhitespace(char[] chars, int start, int length) Signals the start of ignorable whitespace charactersvoidprocessingInstruction(String target, String data) Signals to recieve a processing instructionvoidsetDocumentLocator(Locator locator) Sets the document locatorvoidsetIndentSize(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 parservoidSignals the start of a documentvoidstartElement(String namespaceURI, String localName, String qName, Attributes atts) ContentHandler#startElementvoidstartElement(String name, AttributeList atts) Signals the start of elementvoidstartPrefixMapping(String prefix, String uri) Signals to start the namespace - prefix mappingvoidunescapedCharacters(char[] chars, int start, int length) Signals to receive characters which should not be escapedMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Constructor Details
-
DefaultHandler
Creates a new DefaultHandler -
DefaultHandler
Creates a new DefaultHandler -
DefaultHandler
Creates a new DefaultHandler -
DefaultHandler
Creates a new DefaultHandler
-
-
Method Details
-
cdata
public void cdata(char[] chars, int start, int length) Signals to receive CDATA characters- Specified by:
cdatain interfaceResultHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve
-
characters
Signals the start of characters- Specified by:
charactersin interfaceContentHandler- Specified by:
charactersin interfaceDocumentHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve- Throws:
SAXException
-
comment
Description copied from interface:ResultHandlerSignals to recieve a comment- Specified by:
commentin interfaceResultHandler- Parameters:
data- , the content of the comment
-
endDocument
Signals the end of the document- Specified by:
endDocumentin interfaceContentHandler- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException
-
endElement
Signals the start of element- Specified by:
endElementin interfaceDocumentHandler- Parameters:
name- the name of the elementatts- the AttributeList containing the associated attributes for the element- Throws:
SAXException
-
endElement
ContentHandler#endElement
Signals the end of an element- Specified by:
endElementin interfaceContentHandler- Parameters:
name- the name of the element- Throws:
SAXException
-
endPrefixMapping
Signals to end the namespace prefix mapping- Specified by:
endPrefixMappingin interfaceContentHandler- Parameters:
prefix- the namespace prefix- Throws:
SAXException
-
entityReference
Signals to recieve an entity reference with the given name- Specified by:
entityReferencein interfaceResultHandler- Parameters:
name- the name of the entity reference
-
ignorableWhitespace
Signals the start of ignorable whitespace characters- Specified by:
ignorableWhitespacein interfaceContentHandler- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve- Throws:
SAXException
-
processingInstruction
Signals to recieve a processing instruction- Specified by:
processingInstructionin interfaceContentHandler- Specified by:
processingInstructionin interfaceDocumentHandler- Parameters:
target- the target of the processing instructiondata- the content of the processing instruction- Throws:
SAXException
-
setDocumentLocator
Sets the document locator- Specified by:
setDocumentLocatorin interfaceContentHandler- Specified by:
setDocumentLocatorin interfaceDocumentHandler- 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.- Specified by:
setIndentSizein interfaceResultHandler- Parameters:
indentSize- the number of characters to indent
-
setOutputFormat
Sets the output format information for Formatters that perform serialization.- Specified by:
setOutputFormatin interfaceResultHandler- Parameters:
format- the OutputFormat used to specify properties during serialization
-
skippedEntity
Signals that an entity was skipped by the parser- Specified by:
skippedEntityin interfaceContentHandler- Parameters:
name- the skipped entity's name- Throws:
SAXException
-
startDocument
Signals the start of a document- Specified by:
startDocumentin interfaceContentHandler- Specified by:
startDocumentin interfaceDocumentHandler- Throws:
SAXException
-
startElement
Signals the start of element- Specified by:
startElementin interfaceDocumentHandler- Parameters:
name- the name of the elementatts- the AttributeList containing the associated attributes for the element- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException ContentHandler#startElement
Signals the start of element- Specified by:
startElementin interfaceContentHandler- Parameters:
atts- the AttributeList containing the associated attributes for the elementname- the name of the element- Throws:
SAXException
-
startPrefixMapping
Signals to start the namespace - prefix mapping- Specified by:
startPrefixMappingin interfaceContentHandler- Parameters:
prefix- the namespace prefix to mapuri- the namespace URI- Throws:
SAXException
-
unescapedCharacters
public void unescapedCharacters(char[] chars, int start, int length) Signals to receive characters which should not be escaped- Specified by:
unescapedCharactersin interfaceResultHandler- Parameters:
chars- the character array containing the characters to receivestart- the index into the character array to start receiving characters atlength- the number of characters to recieve
-