com.jclark.xsl.trax

Class TransformerImpl


(package private) class TransformerImpl
extends Transformer

An implementation of the TrAX Transformer class. Can transform a source tree into a result tree

Constructor Summary

TransformerImpl(Sheet sheet, Engine engine, TransformerFactoryImpl factory)
Create a TransformerImpl.

Method Summary

void
clearParameters()
Clear all parameters set with setParameter.
ErrorListener
getErrorListener()
Get the error event handler in effect for the transformation.
Properties
getOutputProperties()
String
getOutputProperty(String name)
Return null.
Object
getParameter(String name)
Get a parameter that was explicitly set with setParameter or setParameters.
URIResolver
getURIResolver()
Get an object that will be used to resolve URIs used in document(), etc.
void
setErrorListener(ErrorListener listener)
Set the error event listener in effect for the transformation.
void
setOutputProperties(Properties oformat)
Set the output properties for the transformation.
void
setOutputProperty(String name, String value)
Set an output property that will be in effect for the transformation.
void
setParameter(String name, Object value)
Add a parameter for the transformation.
void
setURIResolver(URIResolver resolver)
Set an object that will be used to resolve URIs used in document().
void
transform(Source source, Result result)
Process the source tree to the output result.

Constructor Details

TransformerImpl

public TransformerImpl(Sheet sheet,
                       Engine engine,
                       TransformerFactoryImpl factory)
Create a TransformerImpl.

Method Details

clearParameters

public void clearParameters()
Clear all parameters set with setParameter.


getErrorListener

public ErrorListener getErrorListener()
Get the error event handler in effect for the transformation.

Returns:
The current error handler, which should never be null.


getOutputProperties

public Properties getOutputProperties()


getOutputProperty

public String getOutputProperty(String name)
            throws IllegalArgumentException
Return null. See comment for getOutputProperties().


getParameter

public Object getParameter(String name)
Get a parameter that was explicitly set with setParameter or setParameters.


getURIResolver

public URIResolver getURIResolver()
Get an object that will be used to resolve URIs used in document(), etc.


setErrorListener

public void setErrorListener(ErrorListener listener)
            throws IllegalArgumentException
Set the error event listener in effect for the transformation.


setOutputProperties

public void setOutputProperties(Properties oformat)
            throws IllegalArgumentException
Set the output properties for the transformation. These properties will override properties set in the Templates with xsl:output.


setOutputProperty

public void setOutputProperty(String name,
                              String value)
            throws IllegalArgumentException
Set an output property that will be in effect for the transformation.


setParameter

public void setParameter(String name,
                         Object value)
Add a parameter for the transformation.


setURIResolver

public void setURIResolver(URIResolver resolver)
Set an object that will be used to resolve URIs used in document().


transform

public void transform(Source source,
                      Result result)
            throws TransformerException
Process the source tree to the output result.