org.exolab.adaptx.xslt.util
Class SAXInput

java.lang.Object
  extended byorg.exolab.adaptx.xslt.util.SAXInput
All Implemented Interfaces:
org.xml.sax.DocumentHandler

public class SAXInput
extends java.lang.Object
implements org.xml.sax.DocumentHandler

A simple *hack* to provide a SAX adapter for the source tree

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/01 07:39:57 $
Author:
Keith Visco

Constructor Summary
SAXInput()
          Creates a new SAXInput
 
Method Summary
 void characters(char[] chars, int start, int length)
          Signals the start of characters
 void endDocument()
          Signals the end of the document
 void endElement(java.lang.String name)
          Signals the start of element
 void ignorableWhitespace(char[] chars, int start, int length)
          Signals the start of ignorable whitespace characters
 void processingInstruction(java.lang.String target, java.lang.String data)
          Signals to recieve a processing instruction
 void setDocumentLocator(org.xml.sax.Locator locator)
          Sets the document locator
 void setOutputHandler(ResultHandler handler)
           
 void setOutputHandler(java.io.Writer writer)
           
 void setProcessor(XSLTProcessor processor)
          Sets the XSLTProcessor to use for the XSL Transformations
 void setStylesheet(XSLTStylesheet stylesheet)
           
 void startDocument()
          Signals the start of a document
 void startElement(java.lang.String name, org.xml.sax.AttributeList atts)
          Signals the start of element
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXInput

public SAXInput()
Creates a new SAXInput

Method Detail

setProcessor

public void setProcessor(XSLTProcessor processor)
Sets the XSLTProcessor to use for the XSL Transformations

Parameters:
processor - the XSLTProcessor to invoke

setOutputHandler

public void setOutputHandler(ResultHandler handler)

setOutputHandler

public void setOutputHandler(java.io.Writer writer)

setStylesheet

public void setStylesheet(XSLTStylesheet stylesheet)

characters

public void characters(char[] chars,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Signals the start of characters

Specified by:
characters in interface org.xml.sax.DocumentHandler
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
Throws:
org.xml.sax.SAXException

endDocument

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

Specified by:
endDocument in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String name)
                throws org.xml.sax.SAXException
Signals the start of element

Specified by:
endElement in interface org.xml.sax.DocumentHandler
Parameters:
name - the name of the element
Throws:
org.xml.sax.SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] chars,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
Signals the start of ignorable whitespace characters

Specified by:
ignorableWhitespace in interface org.xml.sax.DocumentHandler
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
Throws:
org.xml.sax.SAXException

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Signals to recieve a processing instruction

Specified by:
processingInstruction in interface org.xml.sax.DocumentHandler
Parameters:
target - the target of the processing instruction
data - 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:
setDocumentLocator in interface org.xml.sax.DocumentHandler
Parameters:
locator - the Locator used by this DocumentHandler

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Signals the start of a document

Specified by:
startDocument in interface org.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.SAXException
Signals the start of element

Specified by:
startElement in interface org.xml.sax.DocumentHandler
Parameters:
name - the name of the element
atts - the AttributeList containing the associated attributes for the element
Throws:
org.xml.sax.SAXException