Simple types

A simple type is an abstract definition of an item of data such as a number, a string or a date.

The purpose of a simple type is to define the content of one or more simple elements. Value constraints can be applied to a simple type to constrain the values of any elements which are based on it.

Simple types (and any elements based on them) cannot contain attributes or child elements. Simple types stand in contrast to complex types, which define the structure of an element but usually do not define any simple data.

XML Schema predefines a wide range of simple types which are always available in the Message Definition Editor. Other simple types can be derived from these built-in types by adding value constraints which customize the built-in type.

Deriving a new type by restriction

A simple type can be derived from another simple type (the base type) by restriction. Any value constraints applied to the derived type must further restrict the base type (and any elements based on it). It is illegal for a derived type to weaken or remove a value constraint which its base type has defined.

If no value constraints are applied to the derived type, it will be almost identical to its base type, although it will be treated as a restriction of the base type in situations where that is relevant (type inheritance and element substitution).

Global and local attributes

Simple types can be global or local. A global simple type can be used as the basis for more than one element. It must be given a unique name by which it can be referenced. A local simple type is associated with a single element, and is not available for reuse elsewhere in the message model. Local types do not need a name, and are displayed as ANONYMOUS by the message editor.

Related Concepts
Message modeling concepts
Message model objects
Type inheritance
Value constraints
Substitution groups

Related Tasks
Adding a simple type

Related Reference
Message Definition editor
Simple type logical properties