Complex Types

The discussion so far has focused on simple textual type definitions. While simple types are extremely useful, they are not nearly as expressive as complex type definitions. The XML Schema specification supports the definition of complex types that describe the content model and attribute inventory of a given class of element. A complex type definition fundamentally consists of a content model definition followed by a list of legal attributes. Like simple types, complex types can be named or anonymous and are associated with elements in the same manner, typically using an element declaration in the schema document. Unlike other schema components, complex types and simple types share a symbol space, which means it is illegal to have ...

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.