W3C XML Schema

XML Schema, sometimes abbreviated XSD or referred to as W3C XML Schema (WXS), is an XML vocabulary that enables you to describe other XML vocabularies so that programs can test whether a given document meets rules laid down in the schema. XML Schema is defined by a set of three W3C Recommendations:

XML Schema Part 0: Primer

A tutorial for XML Schema that explains Parts 1 and 2 in less detail and with more examples and integration; available at http://www.w3.org/TR/xmlschema-0/

XML Schema Part 1: Structures

An XML vocabulary for describing the structures of XML vocabularies; based on a mixture of markup and object-oriented design; available at http://www.w3.org/TR/xmlschema-1/

XML Schema Part 2: Datatypes

A set of extensible types for describing the contents of XML elements and attributes, including things like integers, decimals, and dates; available at http://www.w3.org/TR/xmlschema-2/

The mechanisms for defining structures and datatypes both allow schema designers to create type systems that may be extended or restricted.

Tip

For more general information on XML Schema, see Eric van der Vlist’s XML Schema (O’Reilly) or Priscilla Walmsley’s Definitive XML Schema (Prentice-Hall). The Primer noted in the preceding list may also be a good place to start.

XML Schema 1.0, Second Edition, is the current version endorsed by the W3C, though work on XML Schema 1.1 has begun.

Get XML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.