Message model objects: complex types

A complex type describes the structure of one or more complex elements.

Complex types are an essential part of every message model because they define the logical structure of the messages and elements in the model.

What is a complex type for?

Complex types define the structure of the messages and elements in the message model. By combining elements, attributes, groups and wild cards, almost any message structure can be modeled.

Contents of a complex type

Elements

Most complex types contain some elements, and some contain a large hierarchy of complex elements. The elements within a complex type are always contained within a group. This group can be local to the complex type, in which case the Message Definition Editor hides it from view. This is the usual case.

Alternatively, the group that contains the elements can be a global group, and this group defines the element content, the composition, and the content validation for the complex type.

If a complex type is derived from a simple type, it is not allowed to contain any element content.

Attributes
If you are modeling XML messages, your complex types can contain attributes. The attributes for a complex type can be local or global, and they can be contained within an attribute group.
Groups
Groups allow sets of elements to be included in a complex type. The members of the group are included as peers of the other elements. For more information about their use, see Message model objects: groups.
Wild cards
Complex types can contain wildcard elements, which allow unmodeled elements to appear within any elements that are based on the complex type. Any such elements must appear at the same position within the message as the wild card. Complex types can also contain wildcard attributes, which allow unmodeled attributes to appear within any elements that are based on the complex type.

Global and local complex types

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

Composition

The composition of a complex type describes how the members of the type are organized. For more information, see Message model objects: groups.

Controlling validation of type content

The Content validation parameter on a complex type specifies how strictly the contents of the type should be validated. For more information, see Message model objects: groups.

Substitution settings

A complex type has parameters that control whether other types can be derived from it (final) and whether other types can substitute for it (block). For more information, see Substitution groups in the message model and Message model objects: type inheritance.

Related reference
Message Definition editor
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:21:02

ad10410_