public class XSLTransformer
extends java.lang.Object
implements java.io.Serializable, java.lang.Runnable
Constructor and Description |
---|
XSLTransformer()
XSLTransformer constructor
|
XSLTransformer(int id)
XSLTransformer constructor accepting an identifier
|
Modifier and Type | Method and Description |
---|---|
void |
addXSLTransformerErrorListener(XSLTransformerErrorListener p0)
Adds an XSLTransformer error event listener
|
void |
addXSLTransformerListener(XSLTransformerListener p0)
Adds a XSLTransformer listener
|
int |
getId()
Returns the unique XSLTransformer id
|
DocumentFragment |
getResult()
Returns the document fragment for the resulting document.
|
void |
processXSL(XSLStylesheet xsl, java.io.InputStream xml, java.net.URL ref)
Initiates XSL Transformation in the background.
|
void |
processXSL(XSLStylesheet xsl, java.io.Reader xml, java.net.URL ref)
Initiates XSL Transformation in the background.
|
void |
processXSL(XSLStylesheet xsl, java.net.URL xml, java.net.URL ref)
Initiates XSL Transformation in the background.
|
void |
processXSL(XSLStylesheet xsl, XMLDocument xml)
Initiates XSL Transformation in the background.
|
void |
processXSL(XSLStylesheet xsl, XMLDocument xml, java.io.OutputStream os)
Initiates XSL Transformation in the background.
|
void |
removeDOMTransformerErrorListener(XSLTransformerErrorListener p0)
Removes an XSLTransformer error event listener
|
void |
removeXSLTransformerListener(XSLTransformerListener p0)
Removes a XSLTransformer listener
|
void |
run()
Starts a separate thread to do the XSL Transformation.
|
void |
setErrorStream(java.io.OutputStream out)
Sets the error stream used by the XSL processor
|
void |
setXSLTVersion(XSLProcessor.XSLTVersion ver)
Sets the XSLT Version flag used by the XSL processor
|
void |
showWarnings(boolean yes)
Sets the showWarnings flag used by the XSL processor
|
public XSLTransformer()
public XSLTransformer(int id)
id
- - A unique integer that can be used to identify the XSLTransformer instance during event processingpublic int getId()
public void run()
run
in interface java.lang.Runnable
public void addXSLTransformerListener(XSLTransformerListener p0)
p0
- XSLTransformerListener to be addedpublic void addXSLTransformerErrorListener(XSLTransformerErrorListener p0)
p0
- XSLTransformerErrorListener to be addedpublic void removeXSLTransformerListener(XSLTransformerListener p0)
p0
- XSLTransformerListener to be removedpublic void removeDOMTransformerErrorListener(XSLTransformerErrorListener p0)
p0
- XSLTransformerErrorListener to be removedpublic void processXSL(XSLStylesheet xsl, XMLDocument xml) throws XSLException
xsl
- The stylesheet to be used for XSL transformationxml
- The XML document to be used (as a DOM Tree)XSLException
- if an error occurs during XSL transformationpublic void processXSL(XSLStylesheet xsl, java.io.InputStream xml, java.net.URL ref) throws XSLException
xsl
- The stylesheet to be used for XSL transformationxml
- The XML document to be used (as a java.io.InputStream)ref
- Reference URL to resolve external entities in input XMLXSLException
- if an error occurs during XSL transformationpublic void processXSL(XSLStylesheet xsl, java.io.Reader xml, java.net.URL ref) throws XSLException
xsl
- The stylesheet to be used for XSL transformationxml
- The XML document to be used (as a java.io.Reader)ref
- Reference URL to resolve external entities in input XMLXSLException
- if an error occurs during XSL transformationpublic void processXSL(XSLStylesheet xsl, java.net.URL xml, java.net.URL ref) throws XSLException
xsl
- The stylesheet to be used for XSL transformationxml
- The XML document to be used (as a java.net.URL)ref
- Reference URL to resolve external entities in input XMLXSLException
- if an error occurs during XSL transformationpublic void processXSL(XSLStylesheet xsl, XMLDocument xml, java.io.OutputStream os) throws XSLException
xsl
- The stylesheet to be used for XSL transformationxml
- The XML document to be used (as a DOM Tree)os
- Outputstream to which the XSL transformation result is writtenXSLException
- if an error occurs during XSL transformationpublic final void setErrorStream(java.io.OutputStream out) throws java.io.IOException
out
- The error output stream for the XSL processorjava.io.IOException
public final void showWarnings(boolean yes)
yes
- Boolean indicating if XSL processor warnings to be shown or not.public final void setXSLTVersion(XSLProcessor.XSLTVersion ver)
version
- XSLTVersion.XSLT10 or XSLTVersion.XSLT20public DocumentFragment getResult()