Project 1: XML Cookbook

The XML Cookbook is the first of two major projects for this course. The deliverables for the assignment are:

  • Four XML files: three XML recipes and an XML cookbook that includes the three recipes by general entity reference.
  • Two DTDs: One for the XML cookbook that includes a second (for the recipes) by parameter entity reference.
  • An XSL-FO stylesheet that transforms the cookbook into a PDF (using oXygen).

The files above should be in a folder named yourName-cookbook where yourName is your first initial and last name. Save this folder to a ZIP archive of the same name and submit the no later than midnight the day before Spring Break.

You can get an optional review two weeks before the deadline by following the directions above and notifying me the ZIP archive has been uploaded by midnight 14 days before Spring Break begins.

This project can be broken down into five steps that correspond to the material covered in first five course exercises.

This means that as soon as you get feedback on the first exercise, you should know enough to get started on the XML Cookbook. For example, after you get feedback on the first exercise, in which you create a well-formed XML file, go ahead and start developing the XML recipes.

If you get stuck anywhere along the way, post your issue in the Blackboard Discussion Board. If you and your classmates do not post a solution in 24 hours, I will respond. Asking questions or posting solutions is part of your semester grade (participation).

The more information you include in the question or statement of your problem, the more effectively others can respond. If you have feedback about the presentation of the material, please direct it to me in an email.

Step 1: Authoring well-formed XML recipes

Visit the following URL and look at the structure of recipes::

http://en.wikibooks.org/wiki/Cookbook

Compare your favorite to a comparable one, or find one you want to use. They are made available under the Creative Commons License, meaning they can be reproduced with proper attribution.

Pay attention to the way the recipes are structured. These are the elements of a typical recipe to keep in mind as you develop the XML elements that correspond to them. Notice that some of them have an introductory paragraph or two. Most of them list ingredients and a set of instructions (directions, procedure).

You do not need to get too elaborate with the recipes. A recipe root element, a title, an introductory paragraph , a list of ingredients, and a set of cooking instructions are all that are needed to demonstrate your knowledge of the material. Including some attributes on the elements can be good practice, but are strictly optional.

Step 2: Defining a basic recipe DTD

After developing an example XML recipe, develop a DTD so you can replicate the information model of the recipe. After developing your DTD, complete the rest of your recipes.

Step 3: The XML Cookbook

Create an XML cookbook that can include your recipes as external general entities. Then, modify the XML cookbook DTD to include the recipe DTD as a parameter entity.

Note: Once you know the XML recipes are valid against the recipe DTD, delete the DOCTYPE Declarations from them, before including them by entity reference in the cookbook. Then, validate the cookbook against the cookbook DTD.

Step 4: Developing a basic XSL-FO stylesheet

After completing the XSL-FO exercise, use what you have learned to create a simple XSL-FO stylesheet and transform you cookbook to PDF.

Step 5: Zip your files and submit the assignment

Once you have finished your project, zip your yourName-cookbook folder and submit the assignment.

Ensure that all the project files are included.