Tying It All Together
Duration: 60 to 120 minutes.
In this exercise, you will write a schema for one of the two documents shown below. You will then give your schema to another student, who will mark up the document as a valid XML instance of your schema. Likewise, you will mark up the document according to someone else's schema. Save both documents in the TyingItTogetherXsd folder. Validate your document. If there are errors, make necessary changes until it is valid.
If you are likely to be working with document-centric content (e.g, books, manuals, or product documentation), you should build a schema for the business letter shown below.
If you are likely to be working with data-centric content (e.g, more structured data that maps to a database), you should build a schema for the transaction log described below.
A networking website has a feature that allows people to make connections through other connections they have made in the past. A member can search the member list and on finding someone with whom (s)he would like to connect, (s)he can ask a mutual connection to pass on a message to that person.
Colby Germond is a member of this website. Colby is looking for a new sales manager and, in searching the networking website, finds a woman named Liza Millet who seems to fit the bill. Seeing that Liza is connected with Ted Ferris, an associate of his, Colby writes a message to Liza and a separate message to Ted asking him to forward the message to Liza.
The system keeps a log of this transaction and stores it in an XML format.
Your job is to create a schema to represent this data. A person or computer program reading an XML instance of your schema should be able to figure out the flow of the messages and the role of each individual involved.