Chapter 13 Complex types

Complex types are used to define the content model and attributes of elements. This chapter introduces complex types. It covers the four content types (simple, element-only, mixed, and empty), and the use of element declarations, model groups, attribute declarations, and wildcards to define complex types.

13.1 What are complex types?

Elements that have complex types have child elements or attributes. They may also have character content. Example 13–1 shows the elements size, product, letter, and color that have complex types. They have the four different content types that are described in this chapter (simple, element-only, mixed, and empty, respectively).

Attributes can never have ...

Get Definitive XML Schema now with O’Reilly online learning.

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