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

Class SAXTransformerFactory

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

Known Direct Subclasses:
SAXNullTransformerFactory


public abstract class SAXTransformerFactory
extends TransformerFactory

A TransformerFactory that supports several separate modes for working with SAX inputs and outputs. Those modes include: 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 Transformer.transform() operations to map XML text into other text.

    The factory also supports creating Templates objects.

    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

    SAXTransformerFactory()

    Constructor, for use with subclasses

    Method Summary

    TemplatesHandler

    newTemplatesHandler()

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

    TransformerHandler

    newTransformerHandler(Source stylesheet)

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

    TransformerHandler

    newTransformerHandler(Templates stylesheet)

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

    TransformerHandler

    newTransformerHandler()

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

    XMLFilter

    newXMLFilter(Source stylesheet)

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

    XMLFilter

    newXMLFilter(Templates stylesheet)

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

    Field Details

    FEATURE

    public static final String FEATURE

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


    FEATURE_XMLFILTER

    public static final String FEATURE_XMLFILTER

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

    Constructor Details

    SAXTransformerFactory

    protected SAXTransformerFactory()

    Constructor, for use with subclasses

    Method Details

    newTemplatesHandler

    public TemplatesHandler newTemplatesHandler()

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


    newTransformerHandler

    public TransformerHandler newTransformerHandler()

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


    newTransformerHandler

    public TransformerHandler newTransformerHandler(Source stylesheet)

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

    Parameters:
    stylesheet

    newTransformerHandler

    public TransformerHandler newTransformerHandler(Templates stylesheet)

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

    Parameters:
    stylesheet

    newXMLFilter

    public XMLFilter newXMLFilter(Source stylesheet)

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

    Parameters:
    stylesheet

    newXMLFilter

    public XMLFilter newXMLFilter(Templates stylesheet)

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

    Parameters:
    stylesheet