Programming XML in Java - Homework 1

Instructor: John Punin
CSCI 2965 Fall 2001
Due: September 19th 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 laptop specifications and the identification of its owner. For example, the IBM Thinkpad T22 specifications are: An example of its owner specification is: Feel free to add more information related to the laptop or owner. The XML document should list more than three different types of laptop specifications and more than ten different owners.

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/2001/03/webdata/xsv . Include in your report the validator's result.


Submission procedure:

In one email message to gamars@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