Elements that can contain only text are simple type.
Elements that contain other elements or that contain attributes are a complex type.
Attributes are simple type.
There are several built-in simple types, like date, integer, and string.
You can build custom simple types.
Elements of complex type describe the structure of a document, rather than its content.
There are four basic kinds of complex types:
elements that contain just other elements,
elements that contain both elements and text,
elements that contain only text
elements that are empty.
Each of these may contain attributes as well.
Both simple and custom types may be named, which can be reused in other places.
Both simple and custom types may be anonymous, which are used only within the element in which the definition appears.
|