XSLTransformer - Oracle 9i

Syntax:

All Implemented Interfaces:

java.lang.Runnable, java.io.Serializable, oracle.xml.async.XSLTransformerConstants

Description:

Applies XSL transformation in a background thread.

Fields

methodToCall:

protected int methodToCall

The XSL transformation method to call based on input types.

result

protected oracle.xml.async.DocumentFragment result

Transformation result document.

Constructors

XSLTransformer():

public XSLTransformer()

XSLTransformer constructor

XSLTransformer(int):

public XSLTransformer(int id)

XSLTransformer constructor accepting an identifier

Parameters

id - A unique integer that can be used to identify the XSLTransformer instance during event processing

Methods

addXSLTransformerErrorListener(XSLTransformerErrorListener):

public void addXSLTransformerErrorListener (XSLTransformerErrorListener p0)

Adds an XSLTransformer error event listener

Parameters

p0 - XSLTransformerErrorListener to be added

addXSLTransformerListener(XSLTransformerListener):

public void addXSLTransformerListener(XSLTransformerListener p0)

Adds a XSLTransformer listener

Parameters

p0 - XSLTransformerListener to be added

getId():

public int getId()

Returns the unique XSLTransformer id

Returns

The id of this XSLTransformer.

getResult():

public synchronized oracle.xml.async. DocumentFragment getResult()

Returns the document fragment for the resulting document. Call this method only after receiving notification that the transformation is complete. Since the transformation occurs in background and asyncronously, calling this method immediately after processXSL will result in holding the control until the result is avialable.

Returns:

The resulting document fragment of the XSL transformation.

processXSL(XSLStylesheet, InputStream, URL):

public void processXSL(oracle.xml.async. XSLStylesheet xsl,java.io.InputStream xml,java.net.URL ref)

Initiates XSL Transformation in the background. The control is returned immediately.

Parameters

xsl - The stylesheet to be used for XSL transformation xml - The XML document to be used (as a java.io.InputStream) ref - Reference URL to resolve external entities in input XML

Throws

XSLException - if an error occurs during XSL transformation

processXSL(XSLStylesheet, Reader, URL):

public void processXSL(oracle.xml.async.XSLStylesheet xsl, java.io.Reader xml, java.net.URL ref)

Initiates XSL Transformation in the background. The control is returned immediately.

Parameters

xsl - The stylesheet to be used for XSL transformation xml - The XML document to be used (as a java.io.Reader) ref - Reference URL to resolve external entities in input XML

Throws

XSLException - if an error occurs during XSL transformation

processXSL(XSLStylesheet, URL, URL):

public void processXSL(oracle.xml.async. XSLStylesheet xsl, java.net.URL xml,java.net.URL ref)

Initiates XSL Transformation in the background. The control is returned immediately.

Parameters:

xsl - The stylesheet to be used for XSL transformation xml - The XML document to be used (as a java.net.URL) ref - Reference URL to resolve external entities in input XML

Throws

XSLException - if an error occurs during XSL transformation

processXSL(XSLStylesheet, XMLDocument):

public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml)

Initiates XSL Transformation in the background.The control is returned immediately.

Parameters

xsl - The stylesheet to be used for XSL transformation xml - The XML document to be used (as a DOM Tree)

Throws

XSLException - if an error occurs during XSL transformation

processXSL(XSLStylesheet, XMLDocument, OutputStream):

public void processXSL(oracle.xml.async.XSLStylesheet xsl, oracle.xml.async.XMLDocument xml, java.io.OutputStream os)

Initiates XSL Transformation in the background. The control is returned immediately.

Parameters

xsl -The stylesheet to be used for XSL transformation xml -The XML document to be used (as a DOM Tree) os -Outputstream to which the XSL transformation result is written

Throws

XSLException - if an error occurs during XSL transformation

removeDOMTransformerErrorListener(XSLTransformerErrorListener):

public synchronized void removeDOMTransformerErrorListener(XSLTransformerErrorListener p0)

Removes an XSLTransformer error event listener

Parameters

p0 - XSLTransformerErrorListener to be removed

removeXSLTransformerListener(XSLTransformerListener):

public synchronized void removeXSLTransformerListener (XSLTransformerListener p0)

Removes a XSLTransformer listener

Parameters:

p0 - XSLTransformerListener to be removed

run():

public void run()

Starts a separate thread to do the XSL Transformation.

Specified By:

java.lang.Runnable.run() in interface java.lang.Runnable

setErrorStream(OutputStream):

public final void setErrorStream(java.io.OutputStream out)

Sets the error stream used by the XSL processor

Parameters

out - The error output stream for the XSL processor

showWarnings(boolean):

public final void showWarnings(boolean yes)

Sets the showWarnings flag used by the XSL processor

Parameters

yes - Boolean indicating if XSL processor warnings to be shown or not.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 9i Topics