Designing a Report from the XML Document

Now that we have an XML document that represents our joined data sources, we need to develop finished reports in HTML and PDF. The Stylus Studio XML Publisher helps you design reports based on XML documents or XML Schema, and then generate XQuery or XSLT code to create that report in HTML+CSS or XSL-FO document formats.

As shown in Figure 371, the XML Publisher createReport.report uses the XML document resulting from our XML pipeline, myFullOrderSample.xml, as the data source to design a simple book order report.

Figure 371. XML Publisher Report Designer

The table, and the values in its columns, was created by simply dragging nodes from the source document tree and dropping them on the XML Publisher canvas. Additional formatting was specified using XPath expressions (to control row color and quantity color, for example).

When the report design was complete, we used XML Publisher to generate XQuery and XSLT code using the Generate Transformation dialog box.

Figure 372. XML Publisher Generate Transformation Dialog Box

We created createReport.xquery in one generate pass, and createReport.xsl in another. We will add these transformations to our XML pipeline next.

See Chapter 13, "Publishing XML Data," to learn more about designing reports using the XML Publisher.

 
Free Stylus Studio XML Training: