Generate the Code

Once the report is finished, we can generate XSLT or XQuery code to produce a report in HTML+CSS or XSL-FO formats.

30. Click the Generate button on the toolbar.

Stylus Studio displays the Generate Transformation dialog box.

Figure 489. Generate Transformation Dialog Box

We want to use XSLT to generate our report in HTML+CSS, so we do not need to change the values for Document Type or Transformation Language.

31. The default name for the .xsl file is based on the .report file name. We change Untitled1.xsl to myMovieRatings.xsl and click OK.

Stylus Studio opens the generated XSLT in the XSLT Editor, as shown in Figure 490.

Figure 490. XSLT Generated from the XML Publisher Report

32. If we preview the XSLT, we see the same results as when we previewed the report in XML Publisher.

Figure 491. Preview of the XSLT Generated by XML Publisher

 
Free Stylus Studio XML Training:
W3C Member