com.caucho.xsl
Class StyleScript

java.lang.Object
  extended by javax.xml.transform.TransformerFactory
      extended by javax.xml.transform.sax.SAXTransformerFactory
          extended by com.caucho.xsl.AbstractStylesheetFactory
              extended by com.caucho.xsl.StyleScript

public class StyleScript
extends AbstractStylesheetFactory

Public facade for creating StyleScript stylesheets.

 import java.io.*;
 import javax.xml.transform.*;
 import javax.xml.transform.stream.*;
 import org.xml.sax.*;

 import com.caucho.xsl.*;

 ...

 TransformerFactory factory = new Xsl();
 StreamSource xslSource = new StreamSource("mystyle.xsl");
 Transformer transformer = factory.newTransformer(xslSource);

 StreamSource xmlSource = new StreamSource("test.xml");
 StreamResult htmlResult = new StreamResult("test.html");

 transformer.transform(xmlSource, htmlResult);
 


Field Summary
 
Fields inherited from class javax.xml.transform.sax.SAXTransformerFactory
FEATURE, FEATURE_XMLFILTER
 
Constructor Summary
StyleScript()
           
 
Method Summary
protected  org.w3c.dom.Document parseXSL(ReadStream rs)
          Parses the XSL into a DOM document.
 
Methods inherited from class com.caucho.xsl.AbstractStylesheetFactory
getAssociatedStylesheet, getAttribute, getClassLoader, getClassName, getErrorListener, getFeature, getLoadPrecompiledStylesheet, getSearchPath, getStylePath, getSystemId, getURIResolver, getWorkPath, isAutoCompile, loadStylesheet, newStylesheet, newStylesheet, newStylesheet, newStylesheet, newStylesheet, newTemplates, newTemplates, newTemplates, newTemplatesHandler, newTransformer, newTransformer, newTransformer, newTransformerHandler, newTransformerHandler, newTransformerHandler, newXMLFilter, newXMLFilter, parseStylesheet, setAttribute, setAutoCompile, setClassLoader, setClassName, setErrorListener, setFeature, setLoadPrecompiledStylesheet, setSearchPath, setStylePath, setSystemId, setURIResolver, setWorkPath, transform, transform
 
Methods inherited from class javax.xml.transform.TransformerFactory
newInstance, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyleScript

public StyleScript()
Method Detail

parseXSL

protected org.w3c.dom.Document parseXSL(ReadStream rs)
                                 throws javax.xml.transform.TransformerConfigurationException
Parses the XSL into a DOM document.

Specified by:
parseXSL in class AbstractStylesheetFactory
Parameters:
rs - the input stream.
Throws:
javax.xml.transform.TransformerConfigurationException