Sequences and choices in FSD

The FSD allows the schema to define either fixed sequences of records or arbitrary order. Fixed sequence is where each record defined in the sequence must be in the order specified. This is the most common construct in FSD since most flat data structures expect the data to be in a specified order.

However, there are many flat data formats that allow records and fields to be in an arbitrary order, or where markers in the data determine the structure of the records. For these data structures the FSD provides the choice element.

The choice element performs pattern matching in order to determine the best record to use to generate output. The pattern match involves comparison of the field lengths, the delimiters for a field, the number of fields and any specified valid-value for the field.

Note: Use of the choice element is not recommended where it can be avoided, as it has a performance impact on the processing of data.