Package org.exolab.adaptx.xslt.handlers
Class ResultHandlerAdapter
- java.lang.Object
-
- org.exolab.adaptx.xslt.handlers.ResultHandlerAdapter
-
- All Implemented Interfaces:
ResultHandler,org.xml.sax.DocumentHandler
public class ResultHandlerAdapter extends java.lang.Object implements ResultHandler
A simple implemtation of ResultHandler which acts as an adapter for a SAX DocumentHandler.- Version:
- $Revision: 3633 $ $Date: 2003-03-01 08:38:44 +0100 (Sat, 01 Mar 2003) $
- Author:
- Keith Visco
-
-
Constructor Summary
Constructors Constructor Description ResultHandlerAdapter(org.xml.sax.DocumentHandler handler)Creates a new ResultHandlerAdapter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcdata(char[] chars, int start, int length)Signals to receive CDATA charactersvoidcharacters(char[] chars, int start, int length)Signals the start of charactersvoidcomment(java.lang.String data)Signals to recieve a commentvoidendDocument()Signals the end of the documentvoidendElement(java.lang.String name)Signals the start of elementvoidentityReference(java.lang.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(java.lang.String target, java.lang.String data)Signals to recieve a processing instructionvoidsetDocumentLocator(org.xml.sax.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.voidstartDocument()Signals the start of a documentvoidstartElement(java.lang.String name, org.xml.sax.AttributeList atts)Signals the start of elementvoidunescapedCharacters(char[] chars, int start, int length)Signals to receive characters which should not be escaped
-
-
-
Method Detail
-
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
public void characters(char[] chars, int start, int length) throws org.xml.sax.SAXExceptionSignals the start of characters- Specified by:
charactersin interfaceorg.xml.sax.DocumentHandler- 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:
org.xml.sax.SAXException
-
comment
public void comment(java.lang.String data)
Description copied from interface:ResultHandlerSignals to recieve a comment- Specified by:
commentin interfaceResultHandler- Parameters:
data- , the content of the comment
-
endDocument
public void endDocument() throws org.xml.sax.SAXExceptionSignals the end of the document- Specified by:
endDocumentin interfaceorg.xml.sax.DocumentHandler- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String name) throws org.xml.sax.SAXExceptionSignals the start of element- Specified by:
endElementin interfaceorg.xml.sax.DocumentHandler- Parameters:
name- the name of the elementatts- the AttributeList containing the associated attributes for the element- Throws:
org.xml.sax.SAXException
-
entityReference
public void entityReference(java.lang.String name)
Signals to recieve an entity reference with the given name- Specified by:
entityReferencein interfaceResultHandler- Parameters:
name- the name of the entity reference
-
ignorableWhitespace
public void ignorableWhitespace(char[] chars, int start, int length) throws org.xml.sax.SAXExceptionSignals the start of ignorable whitespace characters- Specified by:
ignorableWhitespacein interfaceorg.xml.sax.DocumentHandler- 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:
org.xml.sax.SAXException
-
processingInstruction
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXExceptionSignals to recieve a processing instruction- Specified by:
processingInstructionin interfaceorg.xml.sax.DocumentHandler- Parameters:
target- the target of the processing instructiondata- the content of the processing instruction- Throws:
org.xml.sax.SAXException
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
Sets the document locator- Specified by:
setDocumentLocatorin interfaceorg.xml.sax.DocumentHandler- 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
public void setOutputFormat(OutputFormat format)
Sets the output format information for Formatters that perform serialization.- Specified by:
setOutputFormatin interfaceResultHandler- Parameters:
format- the OutputFormat used to specify properties during serialization
-
startDocument
public void startDocument() throws org.xml.sax.SAXExceptionSignals the start of a document- Specified by:
startDocumentin interfaceorg.xml.sax.DocumentHandler- Throws:
org.xml.sax.SAXException
-
startElement
public void startElement(java.lang.String name, org.xml.sax.AttributeList atts) throws org.xml.sax.SAXExceptionSignals the start of element- Specified by:
startElementin interfaceorg.xml.sax.DocumentHandler- Parameters:
name- the name of the elementatts- the AttributeList containing the associated attributes for the element- Throws:
org.xml.sax.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
-
-