Rational Developer for System z

Groups

A group is a list of elements which defines how those elements can appear in a message.

Groups can be ordered (sequence) unordered (all) or selective (choice). Groups define the composition and content validation of a set of type members.

What are groups for?

Groups can be used for any of the following purposes:

  • To define the entire content of a complex type.

    A complex type can refer to a global group which completely defines its content. (If it does not, the content of the complex type is defined by an anonymous local group, which is hidden within the flow message editor.)

  • To represent a common sub-structure within more than one type.

    Two or more complex types can refer to the same global group if they both contain the same subset of elements.

  • To change the composition midway through a complex type.

    You might have a complex type which is a sequence of three members, but the second member is a choice of two elements. To model this, a group with composition set to choice can be inserted as the second member of the sequence.

Contents of a group

Groups can contain complex elements, simple elements, wildcard elements and groups.

By combining these components, the structure of any message can be modeled. Wildcard elements can be included to allow unmodeled elements to appear, thus making the message model robust and flexible.

Global and local groups

Groups can be global or local.

A global group can be used in more than one place in the message model. It represents a structure which appears in more than one place in the message model. A global group must be given a unique name by which it can be referenced.

A local group is defined in one position within one group, and is not available for reuse elsewhere in the message model. Local groups do not need to be named.

In XML Schema, a group can have its composition set to sequence, all, or choice.

  • A sequence is a set of elements which must appear in same order as they are listed.
  • An all group is a set of elements which can appear in any order, and cannot repeat.
  • A choice is a set of elements, only one of which can appear in any given message.

The message model also allows other compositions, in order to remain compatible with earlier versions of the product.

Controlling validation of type content

The Content validation property on a group determines how strictly the content of the group should be validated. If Content validation is set to:

  • Closed, the contents of the group are validated strictly against the model
  • Open Defined, elements which are declared within the same message set are allowed to appear as children of the group, even if they are not modeled
  • Open, no validation will be performed

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)