Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.xml.transform
Class TransformerFactory

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

Direct Known Subclasses:
  SAXTransformerFactory

public abstract class TransformerFactory
extends java.lang.Object

Represents a factory to make transformers.

Constructor Summary
`protected` | `TransformerFactory()` Default constructor is protected on purpose.

Method Summary
`abstract Source` | `getAssociatedStylesheet(Source source, java.lang.String media, java.lang.String title, java.lang.String charset)` Returns the stylesheet source object associated with the given XML document.
`abstract java.lang.Object` | `getAttribute(java.lang.String name)` Returns an implementation-specific attribute.
`abstract ErrorListener` | `getErrorListener()` Returns the error handler for the factory.
`abstract boolean` | `getFeature(java.lang.String name)` Returns true if the named feature is implemented.
`abstract URIResolver` | `getURIResolver()` Returns the class to be used to lookup relative paths in the stylesheet.
`static TransformerFactory` | `newInstance()` Returns the transformer factory.
`abstract Templates` | `newTemplates(Source source)` Compiles a stylesheet, returning the compiled interface.
`abstract Transformer` | `newTransformer()` Returns an identity transformer.
`abstract Transformer` | `newTransformer(Source source)` Compiles a stylesheet, returning a transformer.
`abstract void` | `setAttribute(java.lang.String name, java.lang.Object value)` Sets an implementation-specific attribute.
`abstract void` | `setErrorListener(ErrorListener listener)` Sets the error handler for the factory.
`abstract void` | `setURIResolver(URIResolver listener)` Sets the class to be used to lookup relative paths in the stylesheet.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TransformerFactory

    protected TransformerFactory()

  Default constructor is protected on purpose.

Method Detail

### newInstance

    public static TransformerFactory newInstance()
                                          throws TransformerFactoryConfigurationError

  Returns the transformer factory.

### getAttribute

    public abstract java.lang.Object getAttribute(java.lang.String name)

  Returns an implementation-specific attribute.
  Parameters:
    `name` - the attribute's name.

### setAttribute

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

  Sets an implementation-specific attribute.
  Parameters:
    `name` - the attribute's name.
    `value` - the attribute's value

### getFeature

    public abstract boolean getFeature(java.lang.String name)

  Returns true if the named feature is implemented.
  Parameters:
    `name` - the feature name.

### getErrorListener

    public abstract ErrorListener getErrorListener()

  Returns the error handler for the factory.

### setErrorListener

    public abstract void setErrorListener(ErrorListener listener)

  Sets the error handler for the factory.

### getURIResolver

    public abstract URIResolver getURIResolver()

  Returns the class to be used to lookup relative paths in the stylesheet.

### setURIResolver

    public abstract void setURIResolver(URIResolver listener)

  Sets the class to be used to lookup relative paths in the stylesheet.

### getAssociatedStylesheet

    public abstract Source getAssociatedStylesheet(Source source,
                                                   java.lang.String media,
                                                   java.lang.String title,
                                                   java.lang.String charset)
                                            throws TransformerConfigurationException

  Returns the stylesheet source object associated with the given XML document.
  Parameters:
    `source` - the XML document which needs a stylesheet.
    `media` - the media attribute for the stylesheet
    `title` - the title attribute for the stylesheet
    `charset` - the character encoding for the stylesheet result.

### newTemplates

    public abstract Templates newTemplates(Source source)
                                    throws TransformerConfigurationException

  Compiles a stylesheet, returning the compiled interface.
  Parameters:
    `source` - specifies the source file.

### newTransformer

    public abstract Transformer newTransformer()
                                        throws TransformerConfigurationException

  Returns an identity transformer.

### newTransformer

    public abstract Transformer newTransformer(Source source)
                                        throws TransformerConfigurationException

  Compiles a stylesheet, returning a transformer.
  Parameters:
    `source` - specifies the source file.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD