15.1. Schemas: The Basic Idea

A schema is like a DTD; each describes a set of element types and notations that can be used to validate an XML document. (A DTD also describes the document’s entity structure, which a schema cannot do.)

A schema is an object with properties that are sets of other objects, which in turn have properties that may be yet other objects (or sets of or sequences or lists of yet other objects). The new classes of objects used to build schemas are called “schema components. Even schema itself is a schema component class: the “schema schema component.”


An abstract DTD could also be built as an object similar to a schema, but no one has chosen to define the classes that would be DTD components. Under most circumstances, ...

Get XML Schema Complete Reference, The now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.