de.vc.jfo.renderer

## Class XSLTRenderer

- java.lang.Object
- - de.vc.jfo.renderer.Renderer
  - - de.vc.jfo.renderer.XSLTRenderer

- All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable, javax.xml.transform.ErrorListener
  Direct Known Subclasses:
    SimpleHTMLRenderer

      public class XSLTRenderer
      extends Renderer
      implements javax.xml.transform.ErrorListener

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected javax.xml.transform.TransformerFactory` | `factory`

    - ### Fields inherited from class de.vc.jfo.renderer.Renderer

      `DEFAULT_PRIORITY, XML_ATTR_CLASS, XML_ATTR_CONFIG_EDITOR, XML_ATTR_CONFIG_FILE, XML_ATTR_NAME, XML_ATTR_PRIORTIY, XML_ATTR_RESET_IMAGE_CACHE, XML_ATTR_USE_JFO_LOGGING, XML_NODE_RENDERER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XSLTRenderer()`
    `XSLTRenderer(OutputFormat outputFormat, java.net.URL stylesheetURL)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `afterRendering()` Invoked after rendering.
    `protected void` | `doRender(java.io.InputStream foStream, java.io.OutputStream outStream, OutputFormat outputFormat)` Do render a FO-stream (Stream is in XML, not in XSL).
    `void` | `error(javax.xml.transform.TransformerException exception)` Receive notification of a recoverable error.
    `void` | `fatalError(javax.xml.transform.TransformerException exception)` Receive notification of a non-recoverable error.
    `java.lang.String` | `getDisplayName()` Gets the display name of renderer that can be shown in GUIs.
    `protected org.apache.commons.logging.Log` | `getLogger()`
    `RTF2FOCompatibilityMode` | `getPreferredRTF2FOCompatibilityMode()` Gets the preferred compatibility mode for RTF to XSL-FO transformation or null if there is no preferation.
    `OutputFormat[]` | `getSupportedOutputFormats()` Gets an array of all supported output formats.
    `protected javax.xml.transform.Templates` | `getTemplates()`
    `protected javax.xml.transform.TransformerFactory` | `getTransformerFactory()`
    `boolean` | `isReady()` Checks if this renderer has all needed resources (external classes, configuration files etc) to renderer a document.
    `void` | `warning(javax.xml.transform.TransformerException exception)` Receive notification of a warning.

    - ### Methods inherited from class de.vc.jfo.renderer.Renderer

      `beforeRendering, canRender, compareTo, configure, copy, createPrinterJob, doRender, equals, getConfigFile, getPrinterJobFactory, getPriority, isUseJFOLogging, logUnsupportedFormat, reconfigure, render, render, render, render, resolveConfig, setConfigFile, setPrinterJobFactory, setPriority, setUseJFOLogging, supportsFormat`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### factory

          protected javax.xml.transform.TransformerFactory factory

  - ### Constructor Detail

    - #### XSLTRenderer

          public XSLTRenderer()

    - #### XSLTRenderer

          public XSLTRenderer(OutputFormat outputFormat,
                      java.net.URL stylesheetURL)

  - ### Method Detail

    - #### getSupportedOutputFormats

          public OutputFormat[] getSupportedOutputFormats()

      Description copied from class: `Renderer`
      Gets an array of all supported output formats.
      Specified by:
        `getSupportedOutputFormats` in class `Renderer`
      Returns:
        Array of output formats (see OUTPUT_*).

    - #### getDisplayName

          public java.lang.String getDisplayName()

      Description copied from class: `Renderer`
      Gets the display name of renderer that can be shown in GUIs.
      Specified by:
        `getDisplayName` in class `Renderer`
      Returns:
        Display name.

    - #### getPreferredRTF2FOCompatibilityMode

          public RTF2FOCompatibilityMode getPreferredRTF2FOCompatibilityMode()

      Description copied from class: `Renderer`
      Gets the preferred compatibility mode for RTF to XSL-FO transformation or null if there is no preferation.
      Overrides:
        `getPreferredRTF2FOCompatibilityMode` in class `Renderer`
      Returns:
        RTF2FOCompatibilityMode

    - #### isReady

          public boolean isReady()

      Description copied from class: `Renderer`
      Checks if this renderer has all needed resources (external classes, configuration files etc) to renderer a document.
      Overrides:
        `isReady` in class `Renderer`
      Returns:
        boolean

    - #### warning

          public void warning(javax.xml.transform.TransformerException exception)
                       throws javax.xml.transform.TransformerException

      Receive notification of a warning.
      Specified by:
        `warning` in interface `javax.xml.transform.ErrorListener`
      Parameters:
        `exception` - TransformerException
      Throws:
        `javax.xml.transform.TransformerException`

    - #### error

          public void error(javax.xml.transform.TransformerException exception)
                     throws javax.xml.transform.TransformerException

      Receive notification of a recoverable error.
      Specified by:
        `error` in interface `javax.xml.transform.ErrorListener`
      Parameters:
        `exception` - TransformerException
      Throws:
        `javax.xml.transform.TransformerException`

    - #### fatalError

          public void fatalError(javax.xml.transform.TransformerException exception)
                          throws javax.xml.transform.TransformerException

      Receive notification of a non-recoverable error.
      Specified by:
        `fatalError` in interface `javax.xml.transform.ErrorListener`
      Parameters:
        `exception` - TransformerException
      Throws:
        `javax.xml.transform.TransformerException`

    - #### afterRendering

          protected void afterRendering()

      Description copied from class: `Renderer`
      Invoked after rendering.
      Overrides:
        `afterRendering` in class `Renderer`

    - #### doRender

          protected void doRender(java.io.InputStream foStream,
                      java.io.OutputStream outStream,
                      OutputFormat outputFormat)
                           throws java.lang.Exception

      Description copied from class: `Renderer`
      Do render a FO-stream (Stream is in XML, not in XSL). You don't have to close the output-stream.
      Specified by:
        `doRender` in class `Renderer`
      Parameters:
        `foStream` - FO-stream.
        `outStream` - Output stream, where rendered FO should be stored into.
        `outputFormat` - Outputformat (see OUTPUT_*).
      Throws:
        `java.lang.Exception` - Throw an exception in necessary.

    - #### getTemplates

          protected javax.xml.transform.Templates getTemplates()
                                                        throws java.io.IOException,
                                                               javax.xml.transform.TransformerConfigurationException

      Throws:
        `java.io.IOException`
        `javax.xml.transform.TransformerConfigurationException`

    - #### getTransformerFactory

          protected javax.xml.transform.TransformerFactory getTransformerFactory()

    - #### getLogger

          protected org.apache.commons.logging.Log getLogger()

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.