You will learn more about simple and complex types in the following chapters.
The note element is a complex type because it contains other elements.
The other elements (to, from, heading, body) are simple types because they do not contain other elements.
Recognising these patterns and presenting them in terms most appropriate to the specific language, database or environment may preserve such data structures across boundaries, as well as providing an improved for consumers of their schemas using data mapping and binding tools.
It is not intended that these constructs should constrain the use of the XML Schema Recommendation.
A repeated element with a required attribute or element with a cardinality of one constrained by This pattern seems promising, though it is limited to an element, difficult to present in a complex Type. Other schema identity constraints such as key/keyref suffer from similar difficulties.
This base type is offered as an alternative to the generic unique pattern and follows the approach taken by Axis.The name of a schema type, attribute or element may be any valid XML non-colonized name including names which may be reserved or not directly representable in some programming languages, such as "object", "static", "final", "class", "Customer-Profile", etc.A collection of data items, typically contained by a programming language "object", "class", "structure", or "record", may be represented in XML Schema using a single model group.This document provides a set of simple XML Schema 1.0 patterns for describing commonly used data structures.The data structures described are intended to be independent of any particular programming language or database or modelling environment. This origin if this document stems from discussions in the Web Services Description Working Group surrounding a set of example XML Schema patterns submitted as examples for the WSDL 2.0 Primer.However, as a result of discussions during the W3C Workshop on XML Schema 1.0 User Experiences, the W3C may form a dedicated Working Group to 1 Introduction 1.1 Notational Conventions 2 Patterns for Common Data Structures 2.1 Naming Types 2.2 Enumerated Type 2.2.1 Extensible Enumerated Type 2.3 Collection 2.3.1 Extending A Collection With Attributes 2.3.2 Extending A Collection With Elements 2.3.3 Inheritance 2.4 Vector 2.5 Maps 2.5.1 Map Keyed with xs: ID or xml: ID 2.5.2 Map Type 2.5.3 WSDL Instance Map Item Type 3 Normative References 4 Informative References A Acknowledgements This note provides a set of example XML Schema structures [XML Schema: Structures] and types [XML Schema: Datatypes] which may be used to exchange commonly used data structures in the form of an XML document.