Programming XML in Java - Homework 1
Instructor: John Punin
CSCI 4968 Spring 2002
Due: February 8th 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 a Personal Library.
The Personal Library consists of a list of books. The following information
should be stored for a book: name, author, ISBN, year, publisher, etc.
Each book could be catalogued as a Text Book, Manual or Novel. If the book
is a text book, the course name information should be added to the book
information. If the book is a manual, the manual subject is required. And,
if the book is a novel, you should add the type of novel. Feel free to
add more information related to a book.
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 konkew@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