javax.xml.transform

Class TransformerFactory

public abstract class TransformerFactory extends Object

Abstract class extended by implementations.

Version: 1.0

Author: Andrew Selkirk, David Brownell

Constructor Summary
protected TransformerFactory()
Constructor, for use by subclasses.
Method Summary
abstract SourcegetAssociatedStylesheet(Source source, String media, String title, String charset)
Returns an object encapsulating the <?
abstract ObjectgetAttribute(String name)
Returns an implementation-specific attribute
abstract ErrorListenergetErrorListener()
Returns the ErrorListener used when parsing stylesheets.
abstract booleangetFeature(String name)
Exposes capabilities of the underlying implementation.
abstract URIResolvergetURIResolver()
Returns the URIResolver used when parsing stylesheets.
static TransformerFactorynewInstance()
Returns a new TransformerFactory.
abstract TemplatesnewTemplates(Source stylesheet)
Returns a pre-compiled stylesheet.
abstract TransformernewTransformer()
Returns a transformer that performs the null transform.
abstract TransformernewTransformer(Source stylesheet)
Returns a transformer making a specified transform.
abstract voidsetAttribute(String name, Object value)
Assigns an implementation-specific attribute
abstract voidsetErrorListener(ErrorListener listener)
Assigns the ErrorListener used when parsing stylesheets.
abstract voidsetURIResolver(URIResolver resolver)
Assigns the URIResolver used when parsing stylesheets.

Constructor Detail

TransformerFactory

protected TransformerFactory()
Constructor, for use by subclasses.

Method Detail

getAssociatedStylesheet

public abstract Source getAssociatedStylesheet(Source source, String media, String title, String charset)
Returns an object encapsulating the <?xml-stylesheet ?> processing instruction from the document that matches the specified criteria.

getAttribute

public abstract Object getAttribute(String name)
Returns an implementation-specific attribute

getErrorListener

public abstract ErrorListener getErrorListener()
Returns the ErrorListener used when parsing stylesheets.

getFeature

public abstract boolean getFeature(String name)
Exposes capabilities of the underlying implementation. Examples include SAXSource.FEATURE and DOMResult.FEATURE.

getURIResolver

public abstract URIResolver getURIResolver()
Returns the URIResolver used when parsing stylesheets.

newInstance

public static TransformerFactory newInstance()
Returns a new TransformerFactory. The name of this class is found by checking, in order: the javax.xml.transform.TransformerFactory system property, $JAVA_HOME/lib/jaxp.properties for the key with that same name, JAR files in the class path with a META-INF/services file with that same name, else the compiled-in platform default.

newTemplates

public abstract Templates newTemplates(Source stylesheet)
Returns a pre-compiled stylesheet.

Parameters: stylesheet XSLT stylesheet specifying transform

newTransformer

public abstract Transformer newTransformer()
Returns a transformer that performs the null transform.

newTransformer

public abstract Transformer newTransformer(Source stylesheet)
Returns a transformer making a specified transform.

Parameters: stylesheet XSLT stylesheet specifying transform

setAttribute

public abstract void setAttribute(String name, Object value)
Assigns an implementation-specific attribute

setErrorListener

public abstract void setErrorListener(ErrorListener listener)
Assigns the ErrorListener used when parsing stylesheets.

setURIResolver

public abstract void setURIResolver(URIResolver resolver)
Assigns the URIResolver used when parsing stylesheets.

Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2011-08-26.