org.apache.turbine.services.xslt
Interface XSLTService

All Superinterfaces:
Initable, Service
All Known Implementing Classes:
TurbineXSLTService

public interface XSLTService
extends Service

The Turbine XSLT Service is used to transform xml with a xsl stylesheet. The service makes use of the Xalan xslt engine available from apache.

Version:
$Id: XSLTService.java 534527 2007-05-02 16:10:59Z tv $
Author:
Leon Messerschmidt, Thomas Vandahl

Field Summary
static java.lang.String SERVICE_NAME
          Service name
static java.lang.String STYLESHEET_CACHING
          Property for caching the stylesheets
static boolean STYLESHEET_CACHING_DEFAULT
          Default for caching the stylesheets
static java.lang.String STYLESHEET_PATH
          Name of the Style sheet path property
static java.lang.String STYLESHEET_PATH_DEFAULT
          Default value of the Style sheet path
 
Method Summary
 java.lang.String transform(java.lang.String xslName, org.w3c.dom.Node in)
          Uses an xsl file to transform xml input from a DOM note and returns a string containing the transformed output.
 java.lang.String transform(java.lang.String xslName, org.w3c.dom.Node in, java.util.Map params)
          Uses an xsl file to transform xml input from a DOM note and returns a string containing the transformed output.
 void transform(java.lang.String xslName, org.w3c.dom.Node in, java.io.Writer out)
          Uses an xsl file to transform xml input from a DOM note and writes the output to a writer.
 void transform(java.lang.String xslName, org.w3c.dom.Node in, java.io.Writer out, java.util.Map params)
          Uses an xsl file to transform xml input from a DOM note and writes the output to a writer.
 java.lang.String transform(java.lang.String xslName, java.io.Reader in)
          Uses an xsl file to transform xml input from a reader and returns a string containing the transformed output.
 java.lang.String transform(java.lang.String xslName, java.io.Reader in, java.util.Map params)
          Uses an xsl file to transform xml input from a reader and returns a string containing the transformed output.
 void transform(java.lang.String xslName, java.io.Reader in, java.io.Writer out)
          Uses an xsl file to transform xml input from a reader and writes the output to a writer.
 void transform(java.lang.String xslName, java.io.Reader in, java.io.Writer out, java.util.Map params)
          Uses an xsl file to transform xml input from a reader and writes the output to a writer.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
Service name

See Also:
Constant Field Values

STYLESHEET_PATH

public static final java.lang.String STYLESHEET_PATH
Name of the Style sheet path property

See Also:
Constant Field Values

STYLESHEET_PATH_DEFAULT

public static final java.lang.String STYLESHEET_PATH_DEFAULT
Default value of the Style sheet path

See Also:
Constant Field Values

STYLESHEET_CACHING

public static final java.lang.String STYLESHEET_CACHING
Property for caching the stylesheets

See Also:
Constant Field Values

STYLESHEET_CACHING_DEFAULT

public static final boolean STYLESHEET_CACHING_DEFAULT
Default for caching the stylesheets

See Also:
Constant Field Values
Method Detail

transform

public void transform(java.lang.String xslName,
                      java.io.Reader in,
                      java.io.Writer out)
               throws java.lang.Exception
Uses an xsl file to transform xml input from a reader and writes the output to a writer.

Parameters:
xslName - The name of the file that contains the xsl stylesheet.
in - The reader that passes the xml to be transformed
out - The writer for the transformed output
Throws:
java.lang.Exception

transform

public java.lang.String transform(java.lang.String xslName,
                                  java.io.Reader in)
                           throws java.lang.Exception
Uses an xsl file to transform xml input from a reader and returns a string containing the transformed output.

Parameters:
xslName - The name of the file that contains the xsl stylesheet.
in - The reader that passes the xml to be transformed
Throws:
java.lang.Exception

transform

public void transform(java.lang.String xslName,
                      org.w3c.dom.Node in,
                      java.io.Writer out)
               throws java.lang.Exception
Uses an xsl file to transform xml input from a DOM note and writes the output to a writer.

Parameters:
xslName - The name of the file that contains the xsl stylesheet.
in - The DOM Node to be transformed
out - The writer for the transformed output
Throws:
java.lang.Exception

transform

public java.lang.String transform(java.lang.String xslName,
                                  org.w3c.dom.Node in)
                           throws java.lang.Exception
Uses an xsl file to transform xml input from a DOM note and returns a string containing the transformed output.

Parameters:
xslName - The name of the file that contains the xsl stylesheet.
Throws:
java.lang.Exception

transform

public void transform(java.lang.String xslName,
                      java.io.Reader in,
                      java.io.Writer out,
                      java.util.Map params)
               throws java.lang.Exception
Uses an xsl file to transform xml input from a reader and writes the output to a writer.

Parameters:
xslName - The name of the file that contains the xsl stylesheet.
in - The reader that passes the xml to be transformed
out - The writer for the transformed output
params - A set of parameters that will be forwarded to the XSLT
Throws:
java.lang.Exception

transform

public java.lang.String transform(java.lang.String xslName,
                                  java.io.Reader in,
                                  java.util.Map params)
                           throws java.lang.Exception
Uses an xsl file to transform xml input from a reader and returns a string containing the transformed output.

Parameters:
xslName - The name of the file that contains the xsl stylesheet.
in - The reader that passes the xml to be transformed
params - A set of parameters that will be forwarded to the XSLT
Throws:
java.lang.Exception

transform

public void transform(java.lang.String xslName,
                      org.w3c.dom.Node in,
                      java.io.Writer out,
                      java.util.Map params)
               throws java.lang.Exception
Uses an xsl file to transform xml input from a DOM note and writes the output to a writer.

Parameters:
xslName - The name of the file that contains the xsl stylesheet.
in - The DOM Node to be transformed
out - The writer for the transformed output
params - A set of parameters that will be forwarded to the XSLT
Throws:
java.lang.Exception

transform

public java.lang.String transform(java.lang.String xslName,
                                  org.w3c.dom.Node in,
                                  java.util.Map params)
                           throws java.lang.Exception
Uses an xsl file to transform xml input from a DOM note and returns a string containing the transformed output.

Parameters:
xslName - The name of the file that contains the xsl stylesheet.
params - A set of parameters that will be forwarded to the XSLT
Throws:
java.lang.Exception


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.