Workshop
The Workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice.
Quiz
| 1. |
What file extension is used to identify XSD schema documents? |
| 2. |
What two primary attributes are used with the xsd:element element to describe an element in an XSD schema? |
| 3. |
What simple type would you use to represent a recurring monthly bill in an XSD schema? |
| 4. |
How do you control how many times an element may appear within an XSD schema? |
Quiz Answers
| 1. |
XSD schema documents are stored with a file extension of .xsd. |
| 2. |
The two primary attributes used with the xsd:element element to describe an element in an XSD schema are name and type. |
| 3. |
Both the xsd:recurringDate and xsd:recurringDay types are sufficient to store the date of a recurring monthly bill. The xsd:recurringDate type would be better if you cared about knowing the month of the bill, whereas the xsd:recurringDay type would work fine if you were interested only in the day of the month. |
| 4. |
The xsd:minOccurs and xsd:maxOccurs attributes allow you to control how many times an element appears within an XSD schema. |
Exercises
| 1. |
Using the pets.xml document from Tutorial 1, create a pets.xsd schema document that uses XSD to describe a virtual pet markup language. |
| 2. |
Modify the pets.xml document so that it can be validated against the new pets.xsd schema document. |