Assignment two builds on assignment one, but now you will build a DTD for the
files that you created in the last assignment. Using your "nested"
and "empty" address book or project document, carefully prepare a
DTD for each of these. There are three -really- important rules here:
1) Do not change your content model nor data structure for your base XML files from assignment one. This is necessary so that I can create a DTD for you with EditML Pro if yours is not correct. The base XML files (nested and empty) must be identical in assignments one and two. If you change your content or data structure, you must submit new base files that I will put into your assignments folder. I'm okay doing that once or twice, but try to settle into your content model and data structure quickly.
2) Do not change your data structure (XML elements and attributes) from one record to the next in your files. Make each record or repeating unit identical. If you are lacking the data for any particular item within a record, simple leave that (nested) element there but have no content in between the elements. In the empty element model, simply use attribute="" to leave the value of an attribute empty.
3) Do not use any "presentational" tags like <text> or <heading> etc. Save this for a assignment three, where your content model and data structure can change a bit.
You will submit a total of four files in assignment two:
All students should send these files by the end of week 5 for nested and empty models. I will need a few days to grade these and get the corrected files back to you. But normally I check them and return them fairly quickly. If you use EditML Pro or XML Spy for this you will have a much easier time, and will actually learn to build out a DTD faster. Build a simple DTD first, and then add the optional features to it. Hand code but validate with a tool.
An example file of an "empty" and "nested" XML documents linked to their corresponding DTDs, and the DTDs for those files can be downloaded (right click on the link) from the links below. You can also "view source" in MSIE, and save the file as an XML or DTD document.
Use these files as guides as this assignment can be a bit trickier than the others.
Please send these four files as attachments by email to rdcormia@earthlink.net . There is no need to zip these files. I will grade them within three days of receiving them. Online students should request a receipt by email.
Click here to return to the course outline.
Copyright © 2006 - 2007 Robert D. Cormia - January 2, 2007