Existence versus presence of components

A component exists if the data object in which it is contained in exists and if the component takes up space (if there is at least one byte in the data stream representing that component).

For example:

  • If a delimiter appears as a placeholder for that component.
  • If the type of that component has an initiator that distinguishes that component from any other component that may appear at that position in a data stream, the component exists if the initiator is there.
  • If the type of that component is a group with an identifier and all components up to and including that identifier have been found to be valid.
  • If the type of the component is an item with a restriction list and one of its restrictions appear in the data.
  • If the type of the component is an item with a Padded To length specified and the item contains at least the number of bytes in the Pad To length.
  • If the type of an optional component is valid, but the component rule evaluates to FALSE, the component only exists if there is a syntactic placeholder.

Data might exist, but might not be present. The presence of data is determined by whether the data has content. The following definitions are used in other parts of the documentation:

EXISTS
Something in the data represents that data object.
CONTENT
The data contains at least one byte other than a syntactical placeholder, such as a pad character or delimiter.
PRESENT
The data object exists and has content.
ABSENT
The data object does not exist or it exists and has no content.

Required components must exist. They do not necessarily have to be present. For example, a required item with no minimum content size can exist, be absent, and still be valid. However, if some minimum content size is specified, a required component is not valid if there is no minimum content.

The existence of optional components depends on the context in which they are used. For example:

  • In a delimited group, an optional component must exist if data follows.
  • In a fixed group, an optional component must exist if trailing white space is required. If no trailing white space is required, an optional component must exist if data follows.
  • In an implicit group, an optional component is not required.

Unlike a required component, when an optional component exists, it might not have content - even when the minimum content specification is greater than zero bytes. The following table explains the conditions that must be met for required and optional components.

EXISTS CONTENT PRESENT ABSENT
Required Component Must exist in any context Must conform to content specification Must be present if minimum content specification is greater than zero bytes. Can be absent only if minimum content specification is zero.
Optional Component Depends on context Need not have content Not necessary Can be absent