Chapter 5. Defining XML Document Structures with XML Schemas

by David Gulbransen

In this chapter

XML Schemas Are a Type of Schema

XML Schemas Compared to DTDs

Element Declarations in XML Schemas

Content Models

<simpleType>

<complexType>

Substitution Groups

Attribute Declarations in XML Schemas

attributeGroup

Enumerations

Associating Schemas with XML Documents

Datatypes in XML Schemas

Primitive Built-In Datatypes

string

boolean

decimal

date

hexBinary

base64Binary

Deriving Simple Types

Deriving Complex Types

Schema Designs

Schema Alternatives

Additional Resources

Roadmap

Get Special Edition Using XML, Second 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.