com.caucho.xsl
Class Xsl

java.lang.Object
  |
  +--javax.xml.transform.TransformerFactory
        |
        +--javax.xml.transform.sax.SAXTransformerFactory
              |
              +--com.caucho.xsl.AbstractStylesheetFactory
                    |
                    +--com.caucho.xsl.Xsl
All Implemented Interfaces:
Source, StylesheetFactory

public class Xsl
extends AbstractStylesheetFactory

Public facade for creating stylesheets. The Xsl factory creates standard XSL stylesheets. A Stylesheet object represents a compiled stylesheet. You'll need to create a Transformer to actually perform any transformations.

 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);
 


Fields inherited from class javax.xml.transform.sax.SAXTransformerFactory
FEATURE, FEATURE_XMLFILTER
 
Constructor Summary
Xsl()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 Stylesheet newStylesheet(java.io.InputStream is)
          Deprecated.  
protected  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, getScriptPath, getSearchPath, getStylePath, getSystemId, getURIResolver, getWorkPath, loadStylesheet, newStylesheet, newStylesheet, newStylesheet, newStylesheet, newTemplates, newTemplates, newTemplates, newTemplatesHandler, newTransformer, newTransformer, newTransformer, newTransformerHandler, newTransformerHandler, newTransformerHandler, newXMLFilter, newXMLFilter, parseStylesheet, setAttribute, setClassLoader, setClassName, setErrorListener, setLoadPrecompiledStylesheet, setScriptPath, setSearchPath, setStylePath, setSystemId, setURIResolver, setWorkPath, transform, transform
 
Methods inherited from class javax.xml.transform.TransformerFactory
newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xsl

public Xsl()
Method Detail

parseXSL

protected Document parseXSL(ReadStream rs)
                     throws TransformerConfigurationException
Parses the XSL into a DOM document.
Overrides:
parseXSL in class AbstractStylesheetFactory
Parameters:
rs - the input stream.

newStylesheet

public Stylesheet newStylesheet(java.io.InputStream is)
                         throws java.lang.Exception
Deprecated.  

Create a new stylesheet from an input stream.
Overrides:
newStylesheet in class AbstractStylesheetFactory
Following copied from interface: com.caucho.transform.StylesheetFactory
Parameters:
is - input stream to an XSL/StyleScript file.
Returns:
the compiled stylesheet.

main

public static void main(java.lang.String[] args)