Create a DTD for your Blog

Assignment 3 — XML Foundations Fall 2007

Assigned: 2007-09-13 / Due: 2007-09-25

Introduction:

Think about how to formalize the rules that describe your blog. The ideal DTD strikes the perfect balance between being too restrictive and too permissive. The design spectrum can be explored most easily by trying to create a varied set of sample entries.

Instructions:

The DTD should reflect the conceptual model of your blog idea from Assignment 1, and of course the XML created in Assignment 2 must validate against the DTD. Create a document type declaration which establishes the connection between the XML document and the DTD. To make the DTD as good as possible (given the rather small scenario that you will be working on), the following criteria must be satisfied:

  1. You must include something in your scenario that uses ID/IDREF attributes. These can be links between blog entries (the simplest case) or more challenging scenarios like the one we discussed in class.
  2. You must use mixed content somewhere.
  3. You must use parameter entities for concepts that you reuse (element content or attributes).
  4. Data types must be based on parameter entities and you should represent data types this way.
  5. Use as many comments as possible to capture all constraints that cannot be expressed in the DTD (this is particularly important so that the switch to XSDL will be easier).

If you have any question how these criteria apply to your scenario, please feel free to ask me. If you want to look at examples, the XHTML DTD that is used for many examples in the lecture slides is an excellent example for a well-designed DTD.


Creative Commons License Please send comments to dret@berkeley.edu
Last modification: Tuesday, 04-Dec-2007 10:08:10 CET
valid CSS! valid XHTML 1.0!