org.apache.cactus.server.runner
Class XMLTransformer

java.lang.Object
  extended byorg.apache.cactus.server.runner.XMLTransformer

public class XMLTransformer
extends java.lang.Object

Helper class that handles the transformation of the XML test results to some output format determined by a stylesheet.

Since:
Cactus 1.5
Version:
$Id: XMLTransformer.java,v 1.5 2003/02/12 21:01:51 vmassol Exp $
Author:
Christopher Lenz, Vincent Massol

Constructor Summary
XMLTransformer(java.io.InputStream theStylesheet)
          Constructor.
 
Method Summary
 java.lang.String getContentType()
          Returns the content type that will be produced by the XSLT stylesheet after transformation.
 void transform(java.io.Reader theXml, java.io.Writer theWriter)
          Performs the actual transformation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLTransformer

public XMLTransformer(java.io.InputStream theStylesheet)
               throws javax.xml.transform.TransformerConfigurationException
Constructor.

Parameters:
theStylesheet - The input stream for the stylesheet to use for the transformations
Throws:
javax.xml.transform.TransformerConfigurationException - if an error occurs when creating the XSL templates
Method Detail

getContentType

public java.lang.String getContentType()
Returns the content type that will be produced by the XSLT stylesheet after transformation.

Returns:
The content type

transform

public void transform(java.io.Reader theXml,
                      java.io.Writer theWriter)
               throws javax.xml.transform.TransformerException
Performs the actual transformation.

Parameters:
theXml - The XML source to transform
theWriter - The writer to which the transformation result should be written.
Throws:
javax.xml.transform.TransformerException - if an error occurs when applying the XSL template to the XML source


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