Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.xml.async
Class XSLTransformer

    java.lang.Object
      |
      +--oracle.xml.async.XSLTransformer

All Implemented Interfaces:
  java.lang.Runnable, java.io.Serializable

public class XSLTransformer
extends java.lang.Object
implements java.io.Serializable, java.lang.Runnable

Applies XSL transformation in a background thread.

See Also:
  Serialized Form

Field Summary
`protected int` | `methodToCall` The XSL transformation method to call based on input types.
`protected DocumentFragment` | `result` Transformation result document.

Constructor Summary
`XSLTransformer()` XSLTransformer constructor
`XSLTransformer(int id)` XSLTransformer constructor accepting an identifier

Method Summary
`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` | `showWarnings(boolean yes)` Sets the showWarnings flag used by the XSL processor

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### methodToCall

    protected int methodToCall

  The XSL transformation method to call based on input types.

### result

    protected DocumentFragment result

  Transformation result document.

Constructor Detail

### XSLTransformer

    public XSLTransformer()

  XSLTransformer constructor

### XSLTransformer

    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

Method Detail

### getId

    public int getId()

  Returns the unique XSLTransformer id
  Returns:
    The id of this XSLTransformer.

### run

    public void run()

  Starts a separate thread to do the XSL Transformation.
  Specified by:
    `run` in interface `java.lang.Runnable`

### addXSLTransformerListener

    public void addXSLTransformerListener(XSLTransformerListener p0)

  Adds a XSLTransformer listener
  Parameters:
    `p0` - XSLTransformerListener to be added

### addXSLTransformerErrorListener

    public void addXSLTransformerErrorListener(XSLTransformerErrorListener p0)

  Adds an XSLTransformer error event listener
  Parameters:
    `p0` - XSLTransformerErrorListener to be added

### removeXSLTransformerListener

    public void removeXSLTransformerListener(XSLTransformerListener p0)

  Removes a XSLTransformer listener
  Parameters:
    `p0` - XSLTransformerListener to be removed

### removeDOMTransformerErrorListener

    public void removeDOMTransformerErrorListener(XSLTransformerErrorListener p0)

  Removes an XSLTransformer error event listener
  Parameters:
    `p0` - XSLTransformerErrorListener to be removed

### processXSL

    public void processXSL(XSLStylesheet xsl,
    XMLDocument xml)
                    throws XSLException

  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

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

  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

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

  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

    public void processXSL(XSLStylesheet xsl,
                           java.net.URL xml,
                           java.net.URL ref)
                    throws XSLException

  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

    public void processXSL(XSLStylesheet xsl,
    XMLDocument xml,
                           java.io.OutputStream os)
                    throws XSLException

  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

### setErrorStream

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

  Sets the error stream used by the XSL processor
  Parameters:
    `out` - The error output stream for the XSL processor
    `java.io.IOException`

### showWarnings

    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.

### getResult

    public 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2004, Oracle. All rights reserved.