Package com.caucho.xsl

The XSLT transformation package.

See:
          Description

Interface Summary
CauchoStylesheet  
 

Class Summary
AbstractStylesheet A compiled XSL stylesheet.
AbstractStylesheet.Depend Class holding a dependency.
AbstractStylesheetFactory Abstract factory for creating stylesheets.
CacheableDocument A document wrapper allowing caching of XSL-generated content.
JavaScriptStylesheet Implementation class for JavaScript stylesheets.
JavaStylesheet Implementation class for JavaScript stylesheets.
NodeTransformerImpl  
SAXTransformerImpl Implements the SAXTransformer.
Sort  
StreamTransformerImpl  
StringTransformerImpl Transforms a document to a result string.
StyleScript Public facade for creating StyleScript stylesheets.
StylesheetImpl Implementation base class for stylesheets.
Template  
TransformerImpl  
Xsl Public facade for creating stylesheets.
XslNumberFormat Formatting for the xsl:number action.
XslWriter Writer stream for generating stylesheet output.
 

Exception Summary
XslParseException  
 

Package com.caucho.xsl Description

The XSLT transformation package. XSLT transforms XML trees to XML trees using Stylesheets. The steps for a typical transformation are:

  1. Create the XSLT stylesheet.
  2. Read the source document.
  3. Transform the source document.

The Caucho XSL package supports two related stylesheet languages. XSLT (W3C 1.0) and 'StyleScript'. Strict XSLT stylesheets are created by parsing the XML externally, then generating the stylesheet:

StylesheetFactory factory = new Xsl();
Stylesheet style = factory.newStylesheet("mystyle.xsl");

StreamTransformer transformer = style.newStreamTransformer();

WriteStream os = Vfs.openWrite("test.html");
transformer.transform("test.xml", os);
os.close();

StyleScript stylesheets just use a different stylesheet factory.

StylesheetFactory factory = new StyleScript();
Stylesheet style = factory.newStylesheet("mystyle.xsl");

StreamTransformer transformer = style.newStreamTransformer();

WriteStream os = Vfs.openWrite("test.html");
transformer.transform("test.xml", os);
os.close();

Transformers

Resin's XSL provides several different output methods, each represented by a transformer: