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

## javax.xml.transform.sax
Class SAXTransformerFactory

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

public abstract class SAXTransformerFactory
extends TransformerFactory

A TransformerFactory that supports several separate modes for working with SAX inputs and outputs. Those modes include:

- Pipeline Stage, pushing events through `TransformerHandler` objects used as SAX handlers, and passing the transformed data through a `SAXResult` encapsulating SAX ContentHandler and LexicalHandler objects;
- Pipeline Termination, like a normal pipeline stage but using some other kind of `Result` to store transformed data rather than passing it to another stage;
- Event producer, an `XMLFilter` object taking data from a URI or from a SAX `InputSource` input object and delivering it to a SAX ContentHandler;
- Transformer objects produced by this factory will usually be able to accept `SAXSource` objects as inputs, and the XMLReader object in such a source could be an XMLFilter.

Transformer objects produced by this factory will of course be able to perform `Transformer.transform()` operations to map XML text into other text.

The factory also supports creating Templates objects.

Version:
  1.0
Author:
  Andrew Selkirk, David Brownell

Field Summary
`static java.lang.String` | `FEATURE` Used with TransformerFactory.getFeature() to determine whether the transformers it produces extend this class.
`static java.lang.String` | `FEATURE_XMLFILTER` Used with TransformerFactory.getFeature() to determine whether newXMLFilter() methods are supported.

Constructor Summary
`protected` | `SAXTransformerFactory()` Constructor, for use with subclasses

Method Summary
`abstract TemplatesHandler` | `newTemplatesHandler()` Returns a SAX event consumer collecting its inputs into a pre-parsed stylesheet.
`abstract TransformerHandler` | `newTransformerHandler()` Returns a SAX event consumer sending its inputs to some Result without transforming them (null transformation).
`abstract TransformerHandler` | `newTransformerHandler(Source stylesheet)` Returns a SAX event consumer sending its inputs to some Result after transforming them according to a stylesheet.
`abstract TransformerHandler` | `newTransformerHandler(Templates stylesheet)` Returns a SAX event consumer sending its inputs to some Result after transforming them according to a pre-parsed stylesheet.
`abstract XMLFilter` | `newXMLFilter(Source stylesheet)` Returns a SAX parser that transforms XML data according to a stylesheet before reporting SAX events.
`abstract XMLFilter` | `newXMLFilter(Templates stylesheet)` Returns a SAX parser that transforms XML data according to a pre-parsed stylesheet before reporting SAX events.

Methods inherited from class javax.xml.transform.TransformerFactory
`getAssociatedStylesheet, getAttribute, getErrorListener, getFeature, getURIResolver, newInstance, newTemplates, newTransformer, newTransformer, setAttribute, setErrorListener, setURIResolver`

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

Field Detail

### FEATURE

    public static final java.lang.String FEATURE

  Used with TransformerFactory.getFeature() to determine whether the transformers it produces extend this class.

### FEATURE_XMLFILTER

    public static final java.lang.String FEATURE_XMLFILTER

  Used with TransformerFactory.getFeature() to determine whether newXMLFilter() methods are supported.

Constructor Detail

### SAXTransformerFactory

    protected SAXTransformerFactory()

  Constructor, for use with subclasses

Method Detail

### newTransformerHandler

    public abstract TransformerHandler newTransformerHandler(Source stylesheet)
                                                      throws TransformerConfigurationException

  Returns a SAX event consumer sending its inputs to some Result after transforming them according to a stylesheet.

### newTransformerHandler

    public abstract TransformerHandler newTransformerHandler(Templates stylesheet)
                                                      throws TransformerConfigurationException

  Returns a SAX event consumer sending its inputs to some Result after transforming them according to a pre-parsed stylesheet.

### newTransformerHandler

    public abstract TransformerHandler newTransformerHandler()
                                                      throws TransformerConfigurationException

  Returns a SAX event consumer sending its inputs to some Result without transforming them (null transformation).

### newXMLFilter

    public abstract XMLFilter newXMLFilter(Source stylesheet)
                                    throws TransformerConfigurationException

  Returns a SAX parser that transforms XML data according to a stylesheet before reporting SAX events.

### newXMLFilter

    public abstract XMLFilter newXMLFilter(Templates stylesheet)
                                    throws TransformerConfigurationException

  Returns a SAX parser that transforms XML data according to a pre-parsed stylesheet before reporting SAX events.

### newTemplatesHandler

    public abstract TemplatesHandler newTemplatesHandler()
                                                  throws TransformerConfigurationException

  Returns a SAX event consumer collecting its inputs into a pre-parsed stylesheet.

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

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 2001-11-20.