Type Definitions

Arguably, the most useful component in a schema definition is a named type definition. XML Schemas supports two distinct categories of types: complex types and simple types (described in parts 1 and 2 of the XML Schemas specification respectively). Complex types describe the [children] and [attributes] of elements in an instance document. Simple types are the set of types that are represented purely as strings with no elements or attributes and are used to describe the [children] of attributes and text-only elements. Simple types are defined using the simpleType construct. Complex types are defined using the complexType construct described later in this chapter.

Part 2 of the XML Schema specification describes a set of "built-in" ...

Get Essential XML: Beyond Markup 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.