gnu.xml.util
Class SAXNullTransformerFactory
java.lang.Object
|
+--javax.xml.transform.TransformerFactory
|
+--javax.xml.transform.sax.SAXTransformerFactory
|
+--gnu.xml.util.SAXNullTransformerFactory
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:
- The 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:See Also:
SAXNullTransformerFactory
public SAXNullTransformerFactory()
Default constructor
getAssociatedStylesheet
public Source getAssociatedStylesheet(javax.xml.transform.Source source, java.lang.String media, java.lang.String title, java.lang.String charset)
(not yet implemented)
Parameters:
getAttribute
public Object getAttribute(java.lang.String key)
Throws an exception (no implementation attributes are supported)
Parameters:
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:
getURIResolver
public URIResolver getURIResolver()
Returns the value assigned by #setURIResolver.
newTemplates
public Templates newTemplates(javax.xml.transform.Source stylesheet)
Throws an exception (XSLT is not supported).
Parameters:
newTemplatesHandler
public TemplatesHandler newTemplatesHandler()
Throws an exception (XSLT is not supported).
newTransformer
public Transformer newTransformer()
newTransformer
public Transformer newTransformer(javax.xml.transform.Source stylesheet)
Throws an exception (XSLT is not supported).
Parameters:
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:
newTransformerHandler
public TransformerHandler newTransformerHandler(javax.xml.transform.Source stylesheet)
Throws an exception (XSLT is not supported).
Parameters:
newTransformerHandler
public TransformerHandler newTransformerHandler(javax.xml.transform.Templates stylesheet)
Throws an exception (XSLT is not supported).
Parameters:
newXMLFilter
public XMLFilter newXMLFilter(javax.xml.transform.Source stylesheet)
Throws an exception (XSLT is not supported).
Parameters:
newXMLFilter
public XMLFilter newXMLFilter(javax.xml.transform.Templates stylesheet)
Throws an exception (XSLT is not supported).
Parameters:
setAttribute
public void setAttribute(java.lang.String key, java.lang.Object value)
Throws an exception (no implementation attributes are supported)
Parameters:
setErrorListener
public void setErrorListener(javax.xml.transform.ErrorListener e)
Assigns a value that would be used when parsing stylesheets
Parameters:
setURIResolver
public void setURIResolver(javax.xml.transform.URIResolver u)
Assigns a value that would be used when parsing stylesheets
Parameters:
This implementation is preliminary.