javax.xml.transform.sax
Class SAXTransformerFactory
java.lang.Object
|
+--javax.xml.transform.TransformerFactory
|
+--javax.xml.transform.sax.SAXTransformerFactory
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 Transformer.transform()
operations to map XML text into other text.
The factory also supports creating Templates objects.
Author:- Andrew Selkirk, David Brownell
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.
SAXTransformerFactory
protected SAXTransformerFactory()
Constructor, for use with subclasses
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(javax.xml.transform.Source stylesheet)
Returns a SAX event consumer sending its inputs to some Result
after transforming them according to a stylesheet.
Parameters:
newTransformerHandler
public TransformerHandler newTransformerHandler(javax.xml.transform.Templates stylesheet)
Returns a SAX event consumer sending its inputs to some Result
after transforming them according to a pre-parsed stylesheet.
Parameters:
newXMLFilter
public XMLFilter newXMLFilter(javax.xml.transform.Source stylesheet)
Returns a SAX parser that transforms XML data according
to a stylesheet before reporting SAX events.
Parameters:
newXMLFilter
public XMLFilter newXMLFilter(javax.xml.transform.Templates stylesheet)
Returns a SAX parser that transforms XML data according
to a pre-parsed stylesheet before reporting SAX events.
Parameters:
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.