|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.util.xml.xslt.AbstractXSLTransform
wt.util.xml.xslt.JAXPXSLTransform
Field Summary | |
private JAXPXMLSourceFactory |
factory
|
private JAXPStylesheet |
stylesheet
|
Constructor Summary | |
(package private) |
JAXPXSLTransform(JAXPXMLSourceFactory factory,
XMLSource xmlSource,
JAXPStylesheet stylesheet,
Hashtable inputParameters)
|
(package private) |
JAXPXSLTransform(JAXPXMLSourceFactory factory,
XMLSource xmlSource,
JAXPStylesheet stylesheet,
Hashtable inputParameters,
String baseURI)
|
Method Summary | |
String |
getBaseURI()
The URI describing the location of the XML data, up to, but not including the file part of the URI. |
Hashtable |
getInputParameters()
The parameters to pass into the stylesheet during the transform. |
InputStream |
getInputStream()
The input stream that can be read to get the XML data in byte form. |
Node |
getNode()
The top-most node in the XML data source. |
Reader |
getReader()
The reader that can be read to get the XML data in character form. |
Stylesheet |
getStyleSheet()
The stylesheet used by the transform. |
private Transformer |
getTransformer()
Produce and configure Transformer object |
private TransformerHandler |
getTransformerHandler()
Produce and configure TransformerHandler object |
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 |
produceEvents(ContentHandler contentHandler,
LexicalHandler lexicalHandler,
DTDHandler dtdHandler)
Note that the DTD handler is not used as JAXP's SAXResult does not allow a DTDHandler to be passed. |
void |
produceEvents(DocumentHandler listener)
Produce the SAX events for the XML source data calling the appropriate handler methods on the provided DocumentHandler instance. |
void |
setInputParameters(Hashtable inputParameters)
Reset the input parameters to the specified set. |
private static void |
setTransformParameters(Transformer transformer,
Hashtable inputParameters)
Apply given input parameters (which can be null) to given Transformer (which cannot be null) |
void |
setXMLSource(XMLSource xmlSource)
Resets the XMLSource to that specified. |
private void |
transform(Result result)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private JAXPXMLSourceFactory factory
private JAXPStylesheet stylesheet
Constructor Detail |
JAXPXSLTransform(JAXPXMLSourceFactory factory, XMLSource xmlSource, JAXPStylesheet stylesheet, Hashtable inputParameters) throws SAXException, IOException
JAXPXSLTransform(JAXPXMLSourceFactory factory, XMLSource xmlSource, JAXPStylesheet stylesheet, Hashtable inputParameters, String baseURI) throws SAXException, IOException
Method Detail |
public Stylesheet getStyleSheet()
XSLTransform
public void produceEvents(ContentHandler contentHandler, LexicalHandler lexicalHandler, DTDHandler dtdHandler) throws SAXException
It is unclear (to me at least) how to improve on this without jumping through some rather ridiculous hoops to use the SAXTransformerFactory class' newFilter() method (which is quite inconsistent with other aspects of JAXP).
contentHandler
- lexicalHandler
- dtdHandler
-
SAXException
public Node getNode() throws SAXException
DOMXMLSource
SAXException
public void outputToStream(OutputStream out) throws SAXException, IOException
XSLTransform
outputToWriter(...)
.
out
-
SAXException
IOException
XSLTransform.outputToWriter(java.io.Writer)
public void outputToWriter(Writer out) throws SAXException, IOException
XSLTransform
out
-
IOException
SAXException
private void transform(Result result) throws SAXException, IOException
SAXException
IOException
private TransformerHandler getTransformerHandler() throws TransformerException
TransformerException
private Transformer getTransformer() throws TransformerException
TransformerException
private static void setTransformParameters(Transformer transformer, Hashtable inputParameters)
public String getBaseURI()
XMLSource
http://www.acme.com/documents/Document1.xml
would
be http://www.acme.com/documents
.
getBaseURI
in interface XMLSource
public XMLSource getXMLSource()
XSLTransform
getXMLSource
in interface XSLTransform
public void setXMLSource(XMLSource xmlSource)
XSLTransform
setXMLSource
in interface XSLTransform
xmlSource
- public Hashtable getInputParameters()
XSLTransform
getInputParameters
in interface XSLTransform
public void setInputParameters(Hashtable inputParameters)
XSLTransform
setInputParameters
in interface XSLTransform
inputParameters
- public InputStream getInputStream() throws IOException
StreamXMLSource
getInputStream
in interface StreamXMLSource
IOException
public Reader getReader() throws IOException
ReaderXMLSource
getReader
in interface ReaderXMLSource
IOException
public void produceEvents(DocumentHandler listener) throws SAXException
SAXXMLSource
produceEvents
in interface SAXXMLSource
listener
- The handler that will "receive" the SAX events as method calls.
SAXException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |