⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
gnu.xml.util

Class SAXNullTransformerFactory

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


public class SAXNullTransformerFactory
extends SAXTransformerFactory

Implements null transforms. XSLT stylesheets are not supported. This class provides a way to translate three representations of XML data (SAX event stream, DOM tree, and XML text) into each other. In essence it's a thinnish wrapper around basic SAX event pipeline facilities, which exposes only limited functionality. The javax.xml.transform functionality is implemented as follows: javax.xml.transform.sax.SAXSource SAXSource class just wraps an XMLReader and InputSource, while the javax.xml.transform.sax.SAXResult SAXResult class is less functional than a gnu.xml.pipeline.EventConsumer EventConsumer. (Notably, it drops all but one declaration from any DTD.)
  • The
  • javax.xml.transform.dom.DOMSource DOMSource class corresponds to special SAX parsers like DomParser, and the javax.xml.transform.dom.DOMResult DOMResult class corresponds to a gnu.xml.pipeline.DomConsumer DomConsumer.
  • The
  • javax.xml.transform.stream.StreamSource StreamSource class corresponds to a SAX InputSource, and the javax.xml.transform.stream.StreamResult StreamResult class corresponds to a gnu.xml.pipeline.TextConsumer TextConsumer.

    This implementation is preliminary.

    Author:
    David Brownell
    See Also:
    gnu.xml.pipeline.XsltFilter

    Constructor Summary

    SAXNullTransformerFactory()

    Default constructor

    Method Summary

    Source

    getAssociatedStylesheet(Source source, java.lang.String media, java.lang.String title, java.lang.String charset)

    (not yet implemented)

    java.lang.Object

    getAttribute(java.lang.String key)

    Throws an exception (no implementation attributes are supported)

    ErrorListener

    getErrorListener()

    Returns the value assigned by #setErrorListener.

    boolean

    getFeature(java.lang.String feature)

    Returns true if the requested feature is supported.

    URIResolver

    getURIResolver()

    Returns the value assigned by #setURIResolver.

    Templates

    newTemplates(Source stylesheet)

    Throws an exception (XSLT is not supported).

    TemplatesHandler

    newTemplatesHandler()

    Throws an exception (XSLT is not supported).

    Transformer

    newTransformer()

    Transformer

    newTransformer(Source stylesheet)

    Throws an exception (XSLT is not supported).

    TransformerHandler

    newTransformerHandler()

    Returns a TransformerHandler that knows how to generate output in all three standard formats.

    TransformerHandler

    newTransformerHandler(Source stylesheet)

    Throws an exception (XSLT is not supported).

    TransformerHandler

    newTransformerHandler(Templates stylesheet)

    Throws an exception (XSLT is not supported).

    XMLFilter

    newXMLFilter(Source stylesheet)

    Throws an exception (XSLT is not supported).

    XMLFilter

    newXMLFilter(Templates stylesheet)

    Throws an exception (XSLT is not supported).

    void

    setAttribute(java.lang.String key, java.lang.Object value)

    Throws an exception (no implementation attributes are supported)

    void

    setErrorListener(ErrorListener e)

    Assigns a value that would be used when parsing stylesheets

    void

    setURIResolver(URIResolver u)

    Assigns a value that would be used when parsing stylesheets

    Constructor Details

    SAXNullTransformerFactory

    public SAXNullTransformerFactory()

    Default constructor

    Method Details

    getAssociatedStylesheet

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

    (not yet implemented)

    Parameters:
    source
    media
    title
    charset

    getAttribute

    public Object getAttribute(java.lang.String key)

    Throws an exception (no implementation attributes are supported)

    Parameters:
    key

    getErrorListener

    public ErrorListener getErrorListener()

    Returns the value assigned by setErrorListener.


    getFeature

    public boolean getFeature(java.lang.String feature)

    Returns true if the requested feature is supported. All three kinds of input and output are accepted: XML text, SAX events, and DOM nodes.

    Parameters:
    feature

    getURIResolver

    public URIResolver getURIResolver()

    Returns the value assigned by setURIResolver.


    newTemplates

    public Templates newTemplates(Source stylesheet)

    Throws an exception (XSLT is not supported).

    Parameters:
    stylesheet

    newTemplatesHandler

    public TemplatesHandler newTemplatesHandler()

    Throws an exception (XSLT is not supported).


    newTransformer

    public Transformer newTransformer()


    newTransformer

    public Transformer newTransformer(Source stylesheet)

    Throws an exception (XSLT is not supported).

    Parameters:
    stylesheet

    newTransformerHandler

    public TransformerHandler newTransformerHandler()

    Returns a TransformerHandler that knows how to generate output in all three standard formats. Output text is generated using XMLWriter, and the GNU implementation of DomDocument DOM is used.

    See Also:
    SAXResult
    StreamResult
    DOMResult

    newTransformerHandler

    public TransformerHandler newTransformerHandler(Source stylesheet)

    Throws an exception (XSLT is not supported).

    Parameters:
    stylesheet

    newTransformerHandler

    public TransformerHandler newTransformerHandler(Templates stylesheet)

    Throws an exception (XSLT is not supported).

    Parameters:
    stylesheet

    newXMLFilter

    public XMLFilter newXMLFilter(Source stylesheet)

    Throws an exception (XSLT is not supported).

    Parameters:
    stylesheet

    newXMLFilter

    public XMLFilter newXMLFilter(Templates stylesheet)

    Throws an exception (XSLT is not supported).

    Parameters:
    stylesheet

    setAttribute

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

    Throws an exception (no implementation attributes are supported)

    Parameters:
    key
    value

    setErrorListener

    public void setErrorListener(ErrorListener e)

    Assigns a value that would be used when parsing stylesheets

    Parameters:
    e

    setURIResolver

    public void setURIResolver(URIResolver u)

    Assigns a value that would be used when parsing stylesheets

    Parameters:
    u