Constraining Blog Contents

Assignment 7 — XML Foundations Fall 2008

Assigned: Tuesday, November 11th, 2008
Due: Tuesday, November 25th, 2008


The XML Schema Definition Language (XSD) aims at overcoming some of the commonly observed limitations of DTDs, most notably the lack of typing. Therefore Simple Types describe content which is not structured by XML markup, which means it describes attribute values and element content. Simple Types can be restricted to yield more specific types.


Take your scenario and type all the basic elements and attributes with appropriate Built-In Types. Enhance your example by additional elements and attributes. Make intensive use of the facets Built-In Types offer to restrict your types as much as possible.

  • Your example should include at least 5 different primitive types and 5 different derived types.
  • The applied facets should at least include the following constraints: length, value limits, decimal digits, and enumeration.
  • Embedded your Simple Type definition in a minimal XSD (you might even generate a skeleton for that from your instance document) and make some validation tests with XML instance documents.

Submit your XSD and your tested XML instance documents.

Creative Commons License Please send comments to
Last modification: Monday, 02-Feb-2009 01:00:13 EST
valid CSS! valid XHTML 1.0!