com.caucho.xsl
Class AbstractStylesheetFactory

java.lang.Object
  |
  +--com.caucho.xsl.AbstractStylesheetFactory
All Implemented Interfaces:
StylesheetFactory
Direct Known Subclasses:
StyleScript, Xsl

public abstract class AbstractStylesheetFactory
extends java.lang.Object
implements StylesheetFactory

Abstract factory for creating stylesheets.


Constructor Summary
AbstractStylesheetFactory()
           
 
Method Summary
 java.lang.ClassLoader getClassLoader()
          Get classloader for loading stylesheets.
 java.lang.String getClassName()
           
 Path getScriptPath()
           
 Path getStylePath()
          Returns the stylesheet search path.
protected  StylesheetImpl loadStylesheet(java.lang.String className)
           
 Stylesheet newStylesheet(Document xsl)
          Create a stylesheet based on a DOM document.
abstract  Stylesheet newStylesheet(java.io.InputStream is)
          Create a stylesheet the input stream as a source.
 Stylesheet newStylesheet(Path path)
           
 Stylesheet newStylesheet(java.lang.String systemId)
          Loads a stylesheet from a named file
 void setClassLoader(java.lang.ClassLoader loader)
          Set the parent classloader for loading stylesheets.
 void setClassName(java.lang.String className)
           
 void setScriptPath(Path path)
           
 void setStylePath(Path path)
          Sets the search path for stylesheets.
 void transform(Document xsl, Node xml, java.io.OutputStream out)
          Convenience class to transform a node.
 void transform(java.lang.String xsl, Node xml, java.io.OutputStream out)
          Convenience class to transform a node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStylesheetFactory

public AbstractStylesheetFactory()
Method Detail

setStylePath

public void setStylePath(Path path)
Sets the search path for stylesheets. Generally applications will use MergePath to create their search path.
Specified by:
setStylePath in interface StylesheetFactory
Parameters:
path - path containing stylesheets.

getStylePath

public Path getStylePath()
Returns the stylesheet search path.
Specified by:
getStylePath in interface StylesheetFactory

setScriptPath

public void setScriptPath(Path path)

getScriptPath

public Path getScriptPath()

setClassName

public void setClassName(java.lang.String className)

getClassName

public java.lang.String getClassName()

setClassLoader

public void setClassLoader(java.lang.ClassLoader loader)
Description copied from interface: StylesheetFactory
Set the parent classloader for loading stylesheets.
Specified by:
setClassLoader in interface StylesheetFactory

getClassLoader

public java.lang.ClassLoader getClassLoader()
Description copied from interface: StylesheetFactory
Get classloader for loading stylesheets.
Specified by:
getClassLoader in interface StylesheetFactory

newStylesheet

public Stylesheet newStylesheet(Document xsl)
                         throws java.lang.Exception
Description copied from interface: StylesheetFactory
Create a stylesheet based on a DOM document.
Specified by:
newStylesheet in interface StylesheetFactory

newStylesheet

public Stylesheet newStylesheet(java.lang.String systemId)
                         throws java.lang.Exception
Loads a stylesheet from a named file
Specified by:
newStylesheet in interface StylesheetFactory
Following copied from interface: com.caucho.transform.StylesheetFactory
Parameters:
systemId - filename of the stylesheet.

newStylesheet

public Stylesheet newStylesheet(Path path)
                         throws java.lang.Exception

newStylesheet

public abstract Stylesheet newStylesheet(java.io.InputStream is)
                                  throws java.lang.Exception
Description copied from interface: StylesheetFactory
Create a stylesheet the input stream as a source.
Specified by:
newStylesheet in interface StylesheetFactory

loadStylesheet

protected StylesheetImpl loadStylesheet(java.lang.String className)
                                 throws java.lang.Exception

transform

public void transform(Document xsl,
                      Node xml,
                      java.io.OutputStream out)
               throws java.lang.Exception
Convenience class to transform a node.

transform

public void transform(java.lang.String xsl,
                      Node xml,
                      java.io.OutputStream out)
               throws java.lang.Exception
Convenience class to transform a node.