The first PowerPoint presentation may serve as a general overview of XML schema, with the second adding more detail. SchemaXML99 is a broad and detailed overview, XSDL is a "whirlwind tour" of the eXtensible Schema Definition Language.
Schemas - Using Schemas in XML
Address Book Schema - Building a schema for the address book.
Tutorial files from W3C on Schema Documents:
Example files - Take a look through these example files. You can copy and paste sections for your final project.
Note that the examples in these chapters are almost all based on the end_species.xsd and end_species.xml files, with minor changes, according to the topic in question. More importantly, I have gone to the trouble (over two excruciating months) to flesh out the examples so that you can really play around with them, send them to XSV for validation and see how they work. Please do copy them to your own site, and then test them and retest them and analyze them. Pay special attention to the comments within the documents, in which I explain which parts are in question and what is going on with them. I hope you find them useful. Let me know.
The files in this section are in the schemas folder.
| Page | Section | Code |
|---|---|---|
| 72 | Beginning a Simple Schema | begin.xsd |
| 73 | Indicating a Simple Schema's Location | location.xml |
| 74 | Annotating Schemas | annotation.xsd |
The files in this section are in the schemas_simple folder.
| Page | Section | Code |
|---|---|---|
| 76-77 | Declaring an Element with a Simple Type |
Figure 6.1: simpletype.xsd Figure 6.4:simpletype_date.xsd |
| 78-79 | Using Date and Time Types |
Figure 6.7: timeDuration.xsd, timeDuration.xml Figure 6.8: time.xsd, time.xml Figure 6.9: timeInstant.xsd, timeInstant.xml Figure 6.10: date.xsd, date.xml Figure 6.11: month.xsd, month.xml Figure 6.12: year.xsd, year.xml Figure 6.13: century.xsd, century.xml Figure 6.14: recurringDate.xsd, recurringDate.xml Figure 6.15: recurringDay.xsd, recurringDay.xml |
| 80 | Using Number Types | numbers.xsd Figure 6.17: numbers.xml Figure 6.18: numbers2.xml |
| 81 | Deriving Custom Simple Types | custom_simple.xsd, custom_simple.xml |
| 82 | Using Anonymous Custom Types | anonymous_simple.xsd, anonymous_simple.xml |
| 83 | Specifying a Set of Acceptable Values | enumeration.xsd, enumeration.xml |
| 84-85 | Specifying a Pattern for a Simple Type |
Figure 6.27: pattern.xsd Figure 6.29: timeDuration_andpattern.xsd Figure 6.31: pattern_choices.xsd |
| 86-87 | Specifying a Range of Acceptable Values |
Figure 6.33: maxInclusive.xsd Figure 6.35: maxExclusive.xsd Figure 6.37: minInclusive.xsd Figure 6.39: minExclusive.xsd |
| 88 | Limiting the Length of a Simple Type |
Figures 6:41 and 6:42: length.xsd, length.xml Figure 6:43: maxLength.xsd |
| 89 | Limiting a Number's Digits |
precision_scale.xsd |
| 90 | Creating List Types |
Figures 6.49 and 6.50: list.xsd, list.xml Figures 6.51 and 6.52: list_length.xsd, list_length.xml |
| 91 | Predefining an Element's Content |
Figure 6.53: fixed.xsd Figure 6.56: default.xsd |
The files in this section are in the schemas_complex folder.
| Page | Section | Code |
|---|---|---|
| 94 | Defining Elements to Contain Only Elements | onlyelements.xsd (onlyelements.xml) |
| 95 | Requiring Elements to Appear in Sequence | sequence.xsd (sequence.xml) |
| 96 | Creating a Set of Choices | choice.xsd Figure 7.8: top: choice.xml bottom: choice2.xml |
| 97 | Allowing Elements to Appear in Any Order | all.xsd,
all.xml |
| 98 | Defining Named Groups | group.xsd |
| 99 | Referencing a Named Group | group.xml |
| 100 | Referencing Already Defined Elements | referencing.xsd (referencing.xml) |
| 101 | Controlling How Many |
Figure 7.18: howmany2.xsd (howmany2.xml) |
| 102 | Defining Elements to Contain Only Text |
Figures 7.19 and 7.20: textonly.xsd |
| 103 | Defining Empty Elements | Figures 7.23 and
7.24: empty.xsd Figure 7.25: empty.xml |
| 104 | Defining Elements with Mixed Content | Figures 7.26 and
7.27: mixed.xsd Figure 7.28: mixed.xml |
| 105 | Basing Complex Types on Complex Types | Figures 7.29, 7.30,
7.31: basing.xsd Figure 7.32: basing.xml |
| 106 | Declaring an Element of Complex Type |
Figure 7.33: basing.xsd Figure 7.34: declaring.xsd
(declaring.xml) |
| 107 | Elements with Anonymous Complex Types |
Figure 7.36: anonymous.xsd |
| 108 | Declaring Attributes | attributes.xsd, attributes.xml |
| 109 | Requiring an Attribute |
Figure 7.40: required.xsd Figure 7.41: top: required.xml; bottom: required2.xml required3.xml (an invalid instance, not shown in the book) |
| 110 | Predefining an Attribute's Content |
Figure 7.42: fixed.xsd Figure 7.44: default.xsd |
| 111 | Defining Attribute Groups | attgroups.xsd |
| 112 | Referencing Attribute Groups |
Click here to return to the course outline.
Last revision September 10, 2001
http://www.informaticus.org/COIN78/week6/index.htm