How to use this book

This book covers the two versions of XML Schema—1.0 and 1.1—and provides revision bars to assist access to just one or the other. In referring to both versions as “XML Schema,” the book follows customary practice, despite the official name of 1.1 being “W3C XML Schema Definition Language (XSD) 1.1.” For either version, the book is useable as both a tutorial and a reference.

As a tutorial, the book can be read from cover to cover with confidence that each topic builds logically on the information that was previously covered. (Of course, knowledge of XML itself is always a prerequisite to learning about XML Schema, and is assumed in this book.)

When using this book as a reference, you have several access options available to you:

• A comprehensive index starts on page 699.

• An alphabetical list of all the elements and attributes that make up the XML Schema syntax is in Appendix A on p. 648. For each there is a reference to further coverage in the body of the book.

• XML Schema includes a basic set of datatypes, known formally as the “built-in simple types.” They are listed in Appendix B on p. 690. This appendix also refers to more detailed descriptions in the body of the book.

• The major changes in version 1.1 of XML Schema are summarized in Section 23.5.1 on p. 640, with references to detailed coverage elsewhere in the book.

Revisions in the Second Edition

This edition of Definitive XML Schema contains more than 500 revisions, covering such new and updated topics as:

• W3C published corrections for errata in XML Schema 1.0

• Current “best practices” after ten years of experience

• XML information modeling for relational and object-oriented modeling paradigms

• Schema design: evaluating pros and cons of alternatives

• Schema strategy: formulating a coherent strategy for schema development and maintenance

• Version 1.1 updates and additions to XML Schema

Identifying 1.1-related revisions

The author has chosen a “1.1 subset” of the book revisions, comprising the 250 most significant revisions that deal with version 1.1. If a section, table, example, or paragraph has content entirely from the “1.1 subset,” there is a solid gray revision bar on its right. If other material might be included, the bar is a gray dotted line.

Strategies for using the revision bars

If your interest is solely 1.0 (perhaps because your software does not yet support 1.1), you may decide to focus on content that either has a dotted revision bar or no bar at all.

If you are interested only in what is new in 1.1 (presumably because you already know 1.0), consider content having either a solid or dotted revision bar in deciding where to focus your reading.

Finally, if your interest is all of 1.1 (because you don’t already know 1.0), you can easily disregard the revision bars (that’s why they are grayed out Image).

Syntax tables

This book contains syntax tables, each summarizing the allowed syntax of an XML Schema component. The first such table does not occur until Section 4.2 on p. 58, by which point the undefined terms in this explanation will have been introduced.

Syntax tables, whose captions all start with “XSD Syntax,” look like the example below, which shows the syntax for named simple types. It contains the following information:

• The element name(s) used for this XML Schema component.

• The possible parent element name(s). Note that “1.1”, printed white on a gray box, precedes override to identify it as a construct that is only permitted in version 1.1. This convention is followed in all syntax tables; it occurs once more in this table.

• A list of allowed attributes, along with their types, valid values, and brief descriptions. The names of required attributes appear in bold font. Default values appear in italics in the Type column.

• The allowed child elements, shown as a content model that uses, for compactness, the XML DTD syntax. Commas indicate that child elements must appear in the order shown, while vertical bars (|) indicate a choice among child elements. Occurrence constraints indicate how many of each may appear: ? means zero or one, * means zero or more, and + means one or more. Otherwise, one and only one is required. In this example, the allowed content is zero or one annotation element, followed by a choice of either one restriction, one list, or one union element.

Table XSD Syntax: named simple type definition

Image

In some cases, there is more than one syntax table for the same element name, because certain element names in XML Schema have multiple uses. For example, simpleType is used for both named simple types and anonymous simple types. Each of these use cases of simpleType allows different attributes and a different set of parent elements, so each is described with its own table.

Companion website

This book has a companion website, maintained by the author, at www.datypic.com/books/defxmlschema2. On the website, you can view any errata and download the examples from this book. In addition to the examples that appear in the book, which are generally concise in order to illustrate a particular point, the website also has larger, more comprehensive instances and schemas that can be copied or used to test validation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.27.155