Grouping and Producing Multiple Output Documents

Assignment 5 - Final — XML Foundations Fall 2011

Assigned: Tuesday, November 22, 2011
Due: Thursday, December 1st, 2011


In this assignment we use two specific features of XSLT 2.0. The requirement is to use grouping for producing content structured according to some grouping criterion, and to produce multiple output files.


As discussed in class, in this assignment you are asked to explore XSLT 2.0's capabilities to produce multiple output documents (the result-document instruction), and to use the grouping functionality (the for-each-group instruction). You are free to choose what you want to group by; good ideas may be dates (probably specific parts of dates such as months), tags/categories, or locations. Whatever it is that you are grouping by, you have to create an index page for all the existing groups in your dataset (e.g., all months), and then you have to link from that index page to the pages with the individual entries. These pages (index page and entry pages) have to be produced as separate standalone HTML documents, and they have to be interlinked properly so that the complete dataset can be traversed by simply following links in a browser.

Here are the formal requirements for this assignment:

  • You have to use at least one grouping criterion for processing your XML. You can also nest grouping such as grouping by year, and then inside each year group all entries are grouped by month. Another possibility is to have parallel independent groups: One grouping groups by month, the other one groups by tag/category independently of the date. For the grouping key, there must be an index page that allows access via that page (in the very same way as blogs may have a page that lists all blog entries for any given month).
  • Pages must be produced as separate HTML documents (in XSLT 2.0 you can also produce XHTML) using XSLT 2.0's support for multiple output documents.
  • Pages must be interlinked, so that it is possible to follow links from the group index to individual entries, and from entries back to the index. Feel free to add additional links, such as next entry, but then you have to make sure that you never produce dangling links (where does next point to on the last entry?).

Please send the XML, the XSLT, and the HTML result to Please send plain text email with all files as attachments. HTML emails will not be accepted.

Creative Commons License Please send comments to
Last modification: Tuesday, 21-Dec-2010 03:22:21 MET
valid CSS! valid XHTML 1.0!