Transforming XML into HTML

Assignment 4 — XML Foundations Fall 2010

Assigned: Thursday, September 30th, 2010
Due: Monday, October 11th, 2010


This is the first XSLT assignment that asks for a very simple transformation from XML to HTML. The only complication is that the stylesheet has to use multiple templates.


As discussed in today's lecture, the goal of this assignment is to create a simple transformation from your XML (as created in assignment 2) to HTML. You might encounter difficulties because of the structure of your XML, and if that is the case, please feel free to change the XML and the DTD to create more useful XML. One of the lessons of working with XPath/XSLT is to understand what XML is easy to process, and what things are not so easy to use. The requirements for this assignment are simple:

  • Your XSLT (you have to use XSLT 1.0 for this assignment) has to produce a single Web page in HTML that contains (most of) the information in your entries. In this assignment, there is no need to include external resources such as images (but feel free to give it a try!).
  • Your XSLT must use multiple templates, which means that it has to avoid the spaghetti code style that we have discussed in class.
  • For processing your entries, there have to be at least two different templates, with one of them processing your normal entries, and the other one doing something special/different for a special kind of entry. We looked at various examples for this in class (visiting wineries in San Francisco), and the concrete choice depends on your scenario and your idea of how you want to present your data.
  • Your XML must have at least 5 entries with a certain degree of variability, plus associated Flickr images. Please continue to produce new content throughout the course of the semester.

Please send the XML, the DTD, 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: Monday, 20-Dec-2010 21:22:21 EST
valid CSS! valid XHTML 1.0!