CIS336 (also Semester 2 of CIS219, CIS221 and IT226)
Website design, implementation and management
Semester 2, 2006-7

Lectured by David Meredith

Exercises for Workshop 6

The following questions test your understanding of the XML Schema language. They are taken from pages 185-7 of Møller and Schwartzbach (2006). If you would like feedback on your answers, e-mail your answers to David Meredith at <>.

  1. For the XML Schema schema given here, write a valid instance document that uses all the declared elements and attributes at least once.
  2. Assume that we are developing an XML language for geographic information. In this language, the contents of an element named point must consist of elements with the following names: address, latitude, longitude and note. In every such content sequence, the element names address, latitude and longitude may occur zero or once; latitude may appear only if longitude appears; either address or latitude must appear, but never both; and there may be any number of note elements anywhere in the sequence. Using XML Schema, formalize the foregoing description of point elements.
  3. Convert the DTD here into XML Schema.