wt.util.xml.xslt
Interface XSLTransform

All Superinterfaces:
DOMXMLSource, ReaderXMLSource, SAX2XMLSource, SAXXMLSource, StreamXMLSource, XMLSource
All Known Implementing Classes:
AbstractXSLTransform

public interface XSLTransform
extends DOMXMLSource, SAXXMLSource, StreamXMLSource, ReaderXMLSource, SAX2XMLSource

Provides access to the results of applying an XSL Transform (aka Stylesheet) to an XMLSource. Use XMLSourceFactory.newXSLTransform(...) for creating new instances.

Supported API: true

Extendable: false

See Also:
XMLSourceFactory.newXSLTransform(wt.util.xml.xslt.XMLSource, wt.util.xml.xslt.Stylesheet, java.util.Hashtable), Stylesheet

Method Summary
 Hashtable getInputParameters()
          The parameters to pass into the stylesheet during the transform.
 Stylesheet getStyleSheet()
          The stylesheet used by the transform.
 XMLSource getXMLSource()
          The XMLSource used as input to the transform (Warning: modifying the XML source and modifying it [for example reading from an input stream] will likely result in errors in the transformation).
 void outputToStream(OutputStream out)
          Write the results of the transformation to the specified OutputStream.
 void outputToWriter(Writer out)
          Write the results of the transformation to the specified Writer.
 void setInputParameters(Hashtable inputParameters)
          Reset the input parameters to the specified set.
 void setXMLSource(XMLSource xmlSource)
          Resets the XMLSource to that specified.
 
Methods inherited from interface wt.util.xml.xslt.DOMXMLSource
getNode
 
Methods inherited from interface wt.util.xml.xslt.XMLSource
getBaseURI
 
Methods inherited from interface wt.util.xml.xslt.SAXXMLSource
produceEvents
 
Methods inherited from interface wt.util.xml.xslt.StreamXMLSource
getInputStream
 
Methods inherited from interface wt.util.xml.xslt.ReaderXMLSource
getReader
 
Methods inherited from interface wt.util.xml.xslt.SAX2XMLSource
produceEvents
 

Method Detail

getStyleSheet

public Stylesheet getStyleSheet()
The stylesheet used by the transform.

Supported API: true

Returns:
Stylesheet

getXMLSource

public XMLSource getXMLSource()
The XMLSource used as input to the transform (Warning: modifying the XML source and modifying it [for example reading from an input stream] will likely result in errors in the transformation).

Supported API: true

Returns:
XMLSource

outputToStream

public void outputToStream(OutputStream out)
                    throws SAXException,
                           IOException
Write the results of the transformation to the specified OutputStream. The character encoding will be the default used by the underlying XSL implementation (most likely the platform default encoding, e.g. Windows-Latin-1) and not necessarily UTF-8. To guarantee a particular character encoding, create and OutputStreamWriter with a specific Java character encoding and use the method outputToWriter(...).

Supported API: true

Parameters:
out -
Throws:
SAXException
IOException
See Also:
outputToWriter(java.io.Writer)

outputToWriter

public void outputToWriter(Writer out)
                    throws SAXException,
                           IOException
Write the results of the transformation to the specified Writer.

Supported API: true

Parameters:
out -
Throws:
SAXException
IOException

getInputParameters

public Hashtable getInputParameters()
The parameters to pass into the stylesheet during the transform. Note that modifying this hashtable will modify the parameters available to the stylesheet.

Supported API: true

Returns:
Hashtable

setXMLSource

public void setXMLSource(XMLSource xmlSource)
Resets the XMLSource to that specified. Useful for resetting the source of a transformation chain.

Supported API: true

Parameters:
xmlSource -

setInputParameters

public void setInputParameters(Hashtable inputParameters)
Reset the input parameters to the specified set.

Supported API: true

Parameters:
inputParameters -