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.XMLReportConsumerxmlReport - file containing the xml reportreportDirectory - base directory where any resource relative
to the report processing should be stored.Exceptionpublic File createNewReportOutput(File reportDirectory) throws Exception
Exceptionpublic void checkDirectory(File dir) throws TestException
TestExceptionCopyright © 2000–2021 Apache Software Foundation. All rights reserved.