public class XSLXMLReportConsumer extends Object implements XMLTestReportProcessor.XMLReportConsumer
XMLTestReportProcessor.XMLReportConsumer
interface simply applies an XSL transformation to the input
XML file and stores the result in a configurable directory.Modifier and Type | Field and Description |
---|---|
static String |
ERROR_OUTPUT_DIRECTORY_UNUSABLE
Error code used when the output directory cannot be used
|
Constructor and Description |
---|
XSLXMLReportConsumer(String stylesheet,
String outputDirectory,
String outputFileName)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
checkDirectory(File dir)
Checks that the input File represents a directory that
can be used.
|
File |
createNewReportOutput(File reportDirectory)
Returns a new file in the outputDirectory, with
the requested report name.
|
void |
onNewReport(File xmlReport,
File reportDirectory)
When a new report has been generated, this consumer
applies the same stylesheet to the input XML document
|
public static final String ERROR_OUTPUT_DIRECTORY_UNUSABLE
public XSLXMLReportConsumer(String stylesheet, String outputDirectory, String outputFileName)
stylesheet
- URI for the stylesheet to apply to the XML reportoutputDirectory
- directory where the result of the XSL transformation
should be writtenoutputFileName
- name of the output report.public void onNewReport(File xmlReport, File reportDirectory) throws Exception
onNewReport
in interface XMLTestReportProcessor.XMLReportConsumer
xmlReport
- file containing the xml reportreportDirectory
- base directory where any resource relative
to the report processing should be stored.Exception
public File createNewReportOutput(File reportDirectory) throws Exception
Exception
public void checkDirectory(File dir) throws TestException
TestException
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.