An XML schema, like a DTD (Document Type Definition), defines the legal
building blocks of an XML document.
More and more companies are starting to
use XML schemas to describe their documents shared between
business partners because of a schema's wide range of features:
- Schemas define elements that can appear in a document
- Schemas define attributes that can appear in a document
- Schemas define which elements are child elements
- Schemas define the order of child elements
- Schemas define the number of child elements
- Schemas define whether an element is empty or can include text
- Schemas define data types for elements and attributes
- Schemas define default and fixed values for elements and attributes
So, are XML schemas the successors of DTDs? I think they will be soon, for the following reasons:
- Schemas are extensible to future additions
- Schemas are richer and more useful than DTDs
- Schemas are written in XML
- Schemas support data types
- Schemas support namespaces
Several XML Schema proposals exist, but the
XML Schema Infoset Model
is 100% compatible with the W3C XML Schema
recommendation V 1.0, 2 May 2001. This version is
described in: XML Schema Part 0: Primer,
XML Schema Part 1: Structures,
and XML Schema Part 2: Datatypes.