Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
javax.xml.transform

Class Transformer

java.lang.Object
|
+--javax.xml.transform.Transformer


public abstract class Transformer

extends Object

Apply a transformation from a source, populating a result. Transformers may be reused, but not concurrently.

Author:

Constructor Summary

Transformer()

Default constructor, for use only by subclasses.

Method Summary

voidclearParameters()

Clears all parameter settings.
javax.xml.transform.ErrorListenergetErrorListener()

Returns the error handler used as documents are transformed.
java.util.PropertiesgetOutputProperties()

Returns a copy of the transformer's non-default output properties.
java.lang.StringgetOutputProperty(java.lang.String name)

Returns the value of a property applying to this transform.
java.lang.ObjectgetParameter(java.lang.String name)

Returns the value of a parameter passed to this transform.
javax.xml.transform.URIResolvergetURIResolver()

Returns the resolver applied to documents being transformed.
voidsetErrorListener(javax.xml.transform.ErrorListener listener)

Assigns the error handler used as documents are transformed.
voidsetOutputProperties(java.util.Properties outputformat)

Assigns a set of output properties, as if made by multiple calls to #setOutputProperty.
voidsetOutputProperty(java.lang.String name, java.lang.String value)

Assigns the value of a transformation property, affecting generation of output (mostly text syntax).
voidsetParameter(java.lang.String name, java.lang.Object value)

Assigns the value of a parameter passed to this transform.
voidsetURIResolver(javax.xml.transform.URIResolver resolver)

Assigns the resolver applied to documents being transformed.
voidtransform(javax.xml.transform.Source source, javax.xml.transform.Result result)

Apply the appropriate transformation

Constructor Details

Transformer

protected Transformer()

Default constructor, for use only by subclasses.


Method Details

clearParameters

public void clearParameters()

Clears all parameter settings.

See Also:


getErrorListener

public ErrorListener getErrorListener()

Returns the error handler used as documents are transformed.


getOutputProperties

public Properties getOutputProperties()

Returns a copy of the transformer's non-default output properties. That is, properties set in the stylesheet or through methods on this class are not set.

See Also:


getOutputProperty

public String getOutputProperty(java.lang.String name)

Returns the value of a property applying to this transform. Values returned by this method are only those that have been set explicitly.

Parameters:

See Also:


getParameter

public Object getParameter(java.lang.String name)

Returns the value of a parameter passed to this transform. These are primarily for use access within transformations and extensions.

Parameters:

See Also:


getURIResolver

public URIResolver getURIResolver()

Returns the resolver applied to documents being transformed.


setErrorListener

public void setErrorListener(javax.xml.transform.ErrorListener listener)

Assigns the error handler used as documents are transformed.

Parameters:


setOutputProperties

public void setOutputProperties(java.util.Properties outputformat)

Assigns a set of output properties, as if made by multiple calls to #setOutputProperty.

Parameters:

See Also:


setOutputProperty

public void setOutputProperty(java.lang.String name, java.lang.String value)

Assigns the value of a transformation property, affecting generation of output (mostly text syntax). Parameters include those defined by the xslt:output element. Default settings may be explicitly overridden.

Parameters:

See Also:


setParameter

public void setParameter(java.lang.String name, java.lang.Object value)

Assigns the value of a parameter passed to this transform. These are primarily for use access within transformations and extensions.

Parameters:

See Also:


setURIResolver

public void setURIResolver(javax.xml.transform.URIResolver resolver)

Assigns the resolver applied to documents being transformed.

Parameters:


transform

public void transform(javax.xml.transform.Source source, javax.xml.transform.Result result)

Apply the appropriate transformation

Parameters: