|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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. this signature will probably change in future releases |
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. this signature will probably change in future releases |
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 |
public void setReaders(org.xml.sax.XMLReader sourceReader, org.xml.sax.XMLReader stylesheetReader)
public void setSourceReader(org.xml.sax.XMLReader sourceReader)
public void setOutputMethodHandler(OutputMethodHandler handler)
setOutputMethodHandler()
or
setContentHandler()
public void setContentHandler(org.xml.sax.ContentHandler handler)
setOutputMethodHandler()
or
setContentHandler()
setContentHandler
in interface org.xml.sax.XMLReader
public void loadStylesheet(org.xml.sax.InputSource stylesheet) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public java.lang.Object clone()
public void setParameter(java.lang.String name, java.lang.Object obj)
public void setSaxExtensionFilter(java.lang.String name, SaxFilterMaker xrap)
public void setDebugger(java.lang.String name, ActionDebugTarget xrap)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |