CIT041X Index > Assignment 5

Assignment 5
Converting XML to XHTML

The object of this assignment is to write an XSLT stylesheet that will transform an XML file to an XHTML file.

The XML file you should use is here.

The Transformation - Requirements

The name attribute in the <recipe> element should be in the output file’s <title> and should also be in an <h1> element.

The <ingredients> element should output an the word Ingredients inside an <h2> element and create an unordered list (<ul>) element.

Each <ingredient> should become a list item inside the unordered list.

The <directions> element should produce the words Directions inside an <h2> element, and set up an ordered list.

Each <step> element should produce a list item in that ordered list.

The <story> element’s content should appear between two <hr width="50%" /> elements.

Here is what the end result should look like.

When You Finish

Name your XSLT file in the form lastname_firstname_1.xsl Thus, Fred Bloggs would have a file named bloggs_fred_1.xsl. Email the file to the instructor.