com.caucho.transform
Interface StylesheetFactory

All Known Implementing Classes:
AbstractStylesheetFactory

public interface StylesheetFactory

Factory for creating stylesheets.

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

Since:
Resin 1.2

Method Summary
 java.lang.ClassLoader getClassLoader()
          Get classloader for loading stylesheets.
 Path getStylePath()
          Returns the current stylesheet search path.
 Stylesheet newStylesheet(Document doc)
          Create a stylesheet based on a DOM document.
 Stylesheet newStylesheet(java.io.InputStream is)
          Create a stylesheet the input stream as a source.
 Stylesheet newStylesheet(java.lang.String systemId)
          Create the named stylesheet.
 void setClassLoader(java.lang.ClassLoader loader)
          Set the parent classloader for loading stylesheets.
 void setStylePath(Path path)
          Sets the path to use to lookup stylesheets.
 

Method Detail

setStylePath

public void setStylePath(Path path)
Sets the path to use to lookup stylesheets. To search multiple paths like CLASSPATH, see MergePath.

getStylePath

public Path getStylePath()
Returns the current stylesheet search path.

setClassLoader

public void setClassLoader(java.lang.ClassLoader loader)
Set the parent classloader for loading stylesheets.

getClassLoader

public java.lang.ClassLoader getClassLoader()
Get classloader for loading stylesheets.

newStylesheet

public Stylesheet newStylesheet(java.lang.String systemId)
                         throws java.lang.Exception
Create the named stylesheet. If the stylesheet already exists, it will simply be loaded without extra compilation.
Parameters:
systemId - filename of the stylesheet.

newStylesheet

public Stylesheet newStylesheet(java.io.InputStream is)
                         throws java.lang.Exception
Create a stylesheet the input stream as a source.

newStylesheet

public Stylesheet newStylesheet(Document doc)
                         throws java.lang.Exception
Create a stylesheet based on a DOM document.