XML Revision

Consider a simple diary/calendar application specified as follows. A diary is a sequence of events. Each event has a date and a description, and has either both a time and a duration or neither. An event can be repeated weekly, monthly or yearly, and this repetition can continue indefinitely, until a specified date or a fixed number of times (weeks, months or years, respectively). The default repetition for an event is weekly, continuing indefinitely.

  1. Define an XML DTD that reflects the above requirements.
  2. Give an XML document, containing at least two different types of event, that is valid with respect to the DTD.
  3. Write an XSLT program that produces an HTML table of all events that occur yearly. Each row in the table should consist of the date and the description of an event.

Sample solutions