Exercises

There are two major styles of XSL: stylesheets for regular, repeating data and stylesheets for documents. They often require quite different strategies to properly control the flow of the presentation.

  1. In the slides we examined a stylesheet (email.xsl) for presenting a single email (email.xml). Extend that stylesheet so that can display an entire mail folder (mailbox.xml) by using separate tables.
  2. Extend the mailbox stylesheet so that it precedes the emails with a 'table of contents', i.e. a list of the subjects.
  3. Create a simple XSL stylesheet to display the fable of the Ant and the Grasshopper (ant.xml). Hint: make sure you use the default templates to do all the hard work!