Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 using the input stream as a source.
`Stylesheet` | `newStylesheet(java.io.Reader is)` Create a stylesheet with the reader 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.
  Returns:
    the compiled stylesheet.

### newStylesheet

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

  Create a stylesheet using the input stream as a source. If the real source is a file, consider using the `newStylesheet(String)` API to enable precompiled stylesheets.
  Parameters:
    `is` - input stream to an XSL/StyleScript file.
  Returns:
    the compiled stylesheet.

### newStylesheet

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

  Create a stylesheet with the reader as a source.

### newStylesheet

    public Stylesheet newStylesheet(Document doc)
                             throws java.lang.Exception

  Create a stylesheet based on a DOM document.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD