WebSphere Message Brokers
File: ad10510_
Writer: Terry Cowling

Concept topic

This build: July 31, 2007 21:23:54

TDS format: Relationship to the logical model

There are some restrictions between TDS separation types and logical model properties such as group composition and group content validation. The rules governing these options are explained in Restrictions for nesting complex types.

These rules exist to ensure the integrity of the message. A combination of separation type and group composition or group content validation must not lead to a message that is unclear to a TDS parser.

Default values

In TDS, Default values are only observed by fixed length elements:

Separation Type Use of Default values

Tagged Delimited
Tagged Fixed Length
Tagged Encoded Length
All Elements Delimited
Data Pattern

Default values are never observed.

Fixed Length
Fixed Length AL3

Default values are observed on output by all elements. An absent element that has no Default value defined, will cause an error on writing.
Variable Length Elements Delimited Default values are only observed by fixed length elements on output. Absent fixed length values must have a Default value available to them. An absent element that has no Default value defined, will cause an error on writing.

Simple types – lists and unions

Lists and unions are XML-specific concepts. An element or attribute of a simple type that is a list or a union will cause a task list warning if a TDS physical format is present in the message set. The user can choose whether to make this an error, warning, or information by editing the Validation preferences. If a dictionary is generated from the message set, and an attempt is made to parse a TDS message defined to contain such elements or attributes, a runtime error will occur.

Start of change

Repeat reference

The logical property Repeat reference specifies a field that holds the number of repeats of an object (Element or Group) within a message. The field that holds the number of repeats must be within the message before the object that it refers to.

From a parsing perspective, the Repeat reference property replaces the role of the minOccurs and maxOccurs properties.

If a value for the Repeat reference property is specified for an object, values that are specified for minOccurs and maxOccurs are ignored when parsing and writing. However, values that are specified for minOccurs and maxOccurs are used by logical validation.

When parsing and writing, the exact interpretation of the Repeat reference property depends on the Data Element Separation property of the parent complex type or group as shown in the table below.

Separation type Interpretation of Repeat reference

Tagged Delimited
Tagged Fixed Length
Tagged Encoded Length

Repeat reference is effectively ignored when parsing and writing. When parsing, the number of occurrences is identified by the tags in the message. When writing, the writer outputs all occurrences in the message tree.
All Elements Delimited Repeat reference is used when parsing and writing, in conjunction with the element’s Repeating Element Delimiter property, and the parent type’s Suppress Absent Element Delimiters property.

A Repeat reference is allowed only if the parent complex type or group has Suppress Absent Element Delimiters set to Never. All Repeat reference occurrences are expected when parsing, and output when writing. However, parsing accepts elements being absent.

Repeat reference = 0 is allowed. No delimiter is expected when parsing, nor output when writing.

Fixed Length
Fixed Length AL3

Repeat reference is used when parsing and writing. Repeat reference occurrences are expected when parsing, and are output when writing, with default values used for missing elements.

Repeat reference = 0 is allowed.

Variable Length Elements Delimited For fixed length simple elements, the rules for Fixed Length separation above are followed.

For variable length simple elements, all complex elements and groups, the rules for All Elements Delimited that are listed above are followed.

Data Pattern Repeat reference is effectively ignored when parsing and writing. When parsing, the pattern is matched as many times as possible. When writing, the writer outputs all occurrences in the message tree. Note that, on parsing, if the data pattern permits a zero length match, and a zero length match occurs, an element is added to the message tree and the matching terminates to prevent an infinite loop.
End of change

Min Occurs and Max Occurs

The logical properties Min Occurs and Max Occurs specify the permitted number of occurrences of an element or group in a message. They are used when parsing and writing messages, and when validating the content of a message.

When parsing and writing, the exact interpretation of these properties depends on the Data Element Separation property of the parent complex type or group as shown in the table below.

When validating, Min Occurs and Max Occurs are both used to check that the content of the message tree matches the model.

Separation type Interpretation of Min Occurs and Max Occurs

Tagged Delimited
Tagged Fixed Length
Tagged Encoded Length

Min Occurs and Max Occurs are effectively ignored when parsing and writing. When parsing, the number of occurrences is identified by the tags in the message. When writing, the writer outputs all occurrences in the message tree.
  • A varying number of occurrences (Min Occurs <> Max Occurs) is allowed.
  • Optional occurrence (Min Occurs = 0) is allowed.
  • Always absent (Max Occurs = 0) is allowed.
  • An unbounded number of occurrences (Max Occurs = -1) is allowed.
All Elements Delimited Max Occurs only is used when parsing and writing, in conjunction with the element’s Repeating Element Delimiter property, and the parent type’s Suppress Absent Element Delimiters property.

A varying number of occurrences (Min Occurs <> Max Occurs) is allowed if Suppress Absent Element Delimiters is set to End of Type.

  • If the Delimiter is different to the Repeating Element Delimiter then the Delimiter will signify the end of the occurrences.
  • If the Delimiter is the same as the Repeating Element Delimiter then an empty repeat signifies the end of the occurrences.
  • In both these cases, Max Occurs is the maximum number of repeats that are expected.

If Suppress Absent Element Delimiters is Never, then all occurrences are expected when parsing, and output when writing, although parsing will accept elements being absent.

Optional occurrence (Min Occurs = 0) is ignored and a delimiter is still expected when parsing, and output when writing.

Always absent (Max Occurs = 0) is allowed. No delimiter is expected when parsing, nor output when writing.

An unbounded number of occurrences (Max Occurs = -1) is only allowed if the Repeating Element Delimiter is different from the Delimiter. The repeats must be terminated by the delimiter, or a containing group's Group Terminator or Delimiter, or by the end of the message bit stream. On writing, the writer outputs all occurrences in the message tree.

Fixed Length
Fixed Length AL3

Max Occurs only is used when parsing and writing. In general, Max Occurs occurrences are expected when parsing, and Max Occurs occurrences are output when writing with default values used for missing elements.

A varying number of occurrences (Min Occurs <> Max Occurs) is ignored, Max Occurs is assumed.

Optional occurrence (Min Occurs = 0) is ignored, Max Occurs is assumed.

Always absent (Max Occurs = 0) is allowed.

Fixed Length only. An unbounded number of occurrences (Max Occurs = -1) is allowed if the element or group is the last child in its parent group, and the group is terminated by a Group Terminator or a containing group’s Group Terminator or Delimiter or by the end of the message bit stream. On writing, the writer outputs all occurrences in the message tree, if this number is less than Min Occurs then additional default values are written.

Variable Length Elements Delimited For fixed length simple elements, the rules for Fixed Length separation above are followed with two differences.
  1. A varying number of occurrences (Min Occurs <> Max Occurs) is allowed, the end of the occurrences being signified by an extra delimiter.
  2. An unbounded number of occurrences (Max Occurs = -1) is allowed, the end of the occurrences being signified by an extra delimiter. On writing, the writer outputs all occurrences in the message tree, followed by an extra delimiter.

For variable length simple elements, all complex elements and groups, the rules for All Elements Delimited above are followed.

Data Pattern Min Occurs and Max Occurs are effectively ignored when parsing and writing. When parsing, the pattern is matched as many times as possible. When writing, the writer outputs all occurrences in the message tree. Note that on parsing, if the data pattern permits a zero length match, and a zero length match occurs, an element is added to the message tree and the matching terminates to prevent an infinite loop.

A varying number of occurrences (Min Occurs <> Max Occurs) is allowed.

Optional occurrence (Min Occurs = 0) is allowed. Always absent (Max Occurs = 0) is allowed.

An unbounded number of occurrences (Max Occurs = -1) is allowed.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:23:55

ad10510_ This topic's URL is: