com.caucho.xsl
Class TransformerImpl

java.lang.Object
  |
  +--com.caucho.xsl.TransformerImpl
All Implemented Interfaces:
Transformer
Direct Known Subclasses:
NodeTransformerImpl, SAXTransformerImpl, StreamTransformerImpl, StringTransformerImpl

public class TransformerImpl
extends java.lang.Object
implements Transformer


Field Summary
static java.lang.String CACHE_DEPENDS
           
protected  java.util.ArrayList cacheDepends
           
static java.lang.String LINE_MAP
           
protected  java.util.HashMap parameters
           
protected  java.util.HashMap properties
           
protected  StylesheetImpl stylesheet
           
 
Constructor Summary
protected TransformerImpl(StylesheetImpl stylesheet)
           
 
Method Summary
 void addCacheDepend(Path path)
           
protected  void addCacheDepend(java.lang.String path)
           
 void addFunction(java.lang.String name, XPathFun fun)
          Adds a new XPath function for the stylesheet.
 java.util.ArrayList getCacheDepends()
           
 boolean getFeature(java.lang.String name)
          Returns true if the Transformer implements the feature.
 java.lang.Object getParameter(java.lang.String name)
          Gets a transformer parameter.
 java.lang.Object getProperty(java.lang.String name)
          Gets a transformer/stylesheet property.
protected  Node parseDocument(java.io.InputStream is)
           
protected  Node parseDocument(java.lang.String url)
           
protected  Node parseStringDocument(java.lang.String source)
           
 void reset()
           
 void setFeature(java.lang.String name, boolean enable)
          Sets a transformer feature.
 void setParameter(java.lang.String name, java.lang.Object value)
          Sets a parameter that XPath expressions in the stylesheet can use as $name.
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets a transformer/stylesheet property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_MAP

public static final java.lang.String LINE_MAP

CACHE_DEPENDS

public static final java.lang.String CACHE_DEPENDS

stylesheet

protected StylesheetImpl stylesheet

properties

protected java.util.HashMap properties

parameters

protected java.util.HashMap parameters

cacheDepends

protected java.util.ArrayList cacheDepends
Constructor Detail

TransformerImpl

protected TransformerImpl(StylesheetImpl stylesheet)
Method Detail

getFeature

public boolean getFeature(java.lang.String name)
Description copied from interface: Transformer
Returns true if the Transformer implements the feature.
Specified by:
getFeature in interface Transformer
Following copied from interface: com.caucho.transform.Transformer
Parameters:
name - name of the feature

setFeature

public void setFeature(java.lang.String name,
                       boolean enable)
Description copied from interface: Transformer
Sets a transformer feature.
Specified by:
setFeature in interface Transformer
Following copied from interface: com.caucho.transform.Transformer
Parameters:
name - name of the feature
value - enable or disable the feature

getProperty

public java.lang.Object getProperty(java.lang.String name)
Description copied from interface: Transformer
Gets a transformer/stylesheet property.
Specified by:
getProperty in interface Transformer
Following copied from interface: com.caucho.transform.Transformer
Parameters:
name - name of the property

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Description copied from interface: Transformer
Sets a transformer/stylesheet property.
Specified by:
setProperty in interface Transformer
Following copied from interface: com.caucho.transform.Transformer
Parameters:
name - name of the property
value - value of the property

setParameter

public void setParameter(java.lang.String name,
                         java.lang.Object value)
Sets a parameter that XPath expressions in the stylesheet can use as $name.
Specified by:
setParameter in interface Transformer
Parameters:
name - the name of the XPath variable.
value - the value for the variable.

getParameter

public java.lang.Object getParameter(java.lang.String name)
Description copied from interface: Transformer
Gets a transformer parameter. Parameters are used to set global xsl:param values.
Specified by:
getParameter in interface Transformer
Following copied from interface: com.caucho.transform.Transformer
Parameters:
name - name of the parameter
Returns:
value of the parameter

reset

public void reset()

addFunction

public void addFunction(java.lang.String name,
                        XPathFun fun)
Description copied from interface: Transformer
Adds a new XPath function for the stylesheet.
Specified by:
addFunction in interface Transformer
Following copied from interface: com.caucho.transform.Transformer
Parameters:
name - name of the function
fun - XPathFun for the function

parseDocument

protected Node parseDocument(java.io.InputStream is)
                      throws java.io.IOException,
                             SAXException

parseDocument

protected Node parseDocument(java.lang.String url)
                      throws java.io.IOException,
                             SAXException

parseStringDocument

protected Node parseStringDocument(java.lang.String source)
                            throws java.io.IOException,
                                   SAXException

addCacheDepend

public void addCacheDepend(Path path)

addCacheDepend

protected void addCacheDepend(java.lang.String path)

getCacheDepends

public java.util.ArrayList getCacheDepends()