com.jclark.xsl.sax2
Interface XSLProcessor

All Superinterfaces:
org.xml.sax.XMLReader
All Known Implementing Classes:
XSLProcessorImpl

public interface XSLProcessor
extends org.xml.sax.XMLReader

typical usage:

    // find an implementation, and construct it
    XSLProcessor xsl = new XSLProcessorImpl();
    xsl.setReaders(sourceXMLReader, styleXMLReader);
    xsl.loadStylesheet(someInputSource);

    // maybe clone for re-use ...
    XSLProcessor nextTime = xsl.clone();

    // maybe set some parameters ...

    // attach an output handler
    xsl.setContentHandler(someHandler);
    xsl.transform(someOtherInputSource);
   


Method Summary
 java.lang.Object clone()
          clone after loadStylesheet() enables us to re-use a transformer, without recompiling the stylesheet
 void loadStylesheet(org.xml.sax.InputSource stylesheet)
          loadStylesheet must be called before parse but after setParser
 void setContentHandler(org.xml.sax.ContentHandler handler)
          set the output target for the transform.
 void setDebugger(java.lang.String name, ActionDebugTarget xrap)
          sets a special kind of extension element processor N.B.
 void setOutputMethodHandler(OutputMethodHandler handler)
          set the output target for the transform.
 void setParameter(java.lang.String name, java.lang.Object obj)
          set the run-time parameters for the stylesheet
 void setReaders(org.xml.sax.XMLReader sourceReader, org.xml.sax.XMLReader stylesheetReader)
          set one parser for the stylesheet, and another for the input
 void setSaxExtensionFilter(java.lang.String name, SaxFilterMaker xrap)
          sets a special kind of extension element processor N.B.
 void setSourceReader(org.xml.sax.XMLReader sourceReader)
          prepare for parsing the input XML document
 
Methods inherited from interface org.xml.sax.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parse, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty
 

Method Detail

setReaders

void setReaders(org.xml.sax.XMLReader sourceReader,
                org.xml.sax.XMLReader stylesheetReader)
set one parser for the stylesheet, and another for the input


setSourceReader

void setSourceReader(org.xml.sax.XMLReader sourceReader)
prepare for parsing the input XML document


setOutputMethodHandler

void setOutputMethodHandler(OutputMethodHandler handler)
set the output target for the transform. Choose one of setOutputMethodHandler() or setContentHandler()


setContentHandler

void setContentHandler(org.xml.sax.ContentHandler handler)
set the output target for the transform. Choose one of setOutputMethodHandler() or setContentHandler()

Specified by:
setContentHandler in interface org.xml.sax.XMLReader

loadStylesheet

void loadStylesheet(org.xml.sax.InputSource stylesheet)
                    throws java.io.IOException,
                           org.xml.sax.SAXException
loadStylesheet must be called before parse but after setParser

Throws:
java.io.IOException
org.xml.sax.SAXException

clone

java.lang.Object clone()
clone after loadStylesheet() enables us to re-use a transformer, without recompiling the stylesheet


setParameter

void setParameter(java.lang.String name,
                  java.lang.Object obj)
set the run-time parameters for the stylesheet


setSaxExtensionFilter

void setSaxExtensionFilter(java.lang.String name,
                           SaxFilterMaker xrap)
sets a special kind of extension element processor N.B. this signature will probably change in future releases


setDebugger

void setDebugger(java.lang.String name,
                 ActionDebugTarget xrap)
sets a special kind of extension element processor N.B. this signature will probably change in future releases