Report Formatting and Other Post-Processing

The last process works with the generic XML report.


Google

Using a domain-specific XML format for the generated format makes it easy for the framework to support multiple different formats. Supporting a new output format is just a matter of writing a new module that processes the XML report file.

Figure 1.5. XSLT Processing of the XML Report

There are many ways to do this. Of course, there is the XSLT way which can be used to format the report using stylesheets to convert to other XML formats. That's how we support the HTML, XHTML, LogML and PDF formats. Figure Figure 1.5 gives an example of such processing.

Figure 1.6. Processing of the XML Report Using The APIs

As shown in the Figure 1.6 figure, you can also process the XML files using the APIs to the XML report format. That's how charts generation and the Excel backend are implemented. There's actually two APIs to process XML reports; one is event based and the other is object based. That's making different styles of programming possible. That's the equivalent of the SAX vs DOM model in the XML world.