Programming XML in Java - Homework 1

Instructor: John Punin
CSCI 2962 Spring 2001
Due: March 9th 11:59:59 PM

Objective

The objective of this homework is to help you become familiar with the concepts of well-formed XML Document, valid XML Document, DTD and XML Schema

Part A

Write an example of a well-formed XML Document that stores an Address Book. The Address Book consists of a list of addresses of people and businesses. The following information should be stored for a person: name, age, gender, phone number, e-mail, URL of home page, address. The information for a business is: name, contact person, phone numbers, e-mail, URL of web site, address. Feel free to add more information related to a person or business.

Part B

Write a DTD that describes the structure and semantics of your answer to part A. Use ENTITY, ELEMENT, and ATTLIST declarations in your DTD. Please write comments in your DTD, explaining each declaration of your DTD.

Associate your DTD with the well-formed XML Document of part A to make a valid XML Document. Report this valid XML document and validate it using the Scholarly Technology Group at Brown University's validator at: http://www.stg.brown.edu/service/xmlvalid/ . Include in your report the validator's results.

Part C

Write a W3C XML Schema that describes the structure and semantics of your answer to part A. Use simpleType, complexType, element, attribute and group elements to write your XML Schema. Please write comments for each simpleType, complexType, element, attribute and group elements of your XML Schema.

Associate your XML Schema with the well-formed XML Document of part A to make a valid XML Document. Report this valid XML document.

Optional: Try to validate your XML Schema Document and your valid XML Document using the XSV Validator at: http://www.w3.org/2000/09/webdata/xsv . Include in your report the validator's result.


Submission procedure:

In one email message to uffelg@cs.rpi.edu, with the subject line reading "XMLJ: HW # 1 submission". You can write a little message if you want and then should include the files AS ATTACHMENTS. If you have 2 files, then you should have 2 attachments in the email message. Just as long as each attachment contains only one file.
to Programming XML in Java Home Page