Hi Folks, At the core of every data format are "fields". If you learn how to specify fields, then you've learned much of DFDL.
There are 16 categories of fields. Below is my writeup of this stuff. I would appreciate any comments you have of the writeup - is it easy to read? does it have typos? is it complete and correct? -------------------------------------------------------------------------------- Data formats consist of a series of "fields." A field may have a fixed length or a variable length. If there is no data to populate a field, the field may be empty or there may be a symbol used to indicate the field is empty (the field is nillable or not nillable). A field's value may consist of parts (composite field) or its values are atomic/indivisible. A field may be populated with a choice of values or not. So there are 4 variables determining a field: length, nillability, composite, and choice. Each variable has two possibilities, e.g., length is either fixed or variable. The number of permutations of 4 variables, each with 2 values, are: 2 x 2 x 2 x 2 = 16. Here are the 16 categories of fields: 1. Fixed length, nillable, not composite, no choice 2. Fixed length, nillable, not composite, choice 3. Fixed length, nillable, composite, no choice 4. Fixed length, nillable, composite, choice 5. Fixed length, not nillable, not composite, no choice 6. Fixed length, not nillable, not composite, choice 7. Fixed length, not nillable, composite, no choice 8. Fixed length, not nillable, composite, choice 9. Variable length, nillable, not composite, no choice 10. Variable length, nillable, not composite, choice 11. Variable length, nillable, composite, no choice 12. Variable length, nillable, composite, choice 13. Variable length, not nillable, not composite, no choice 14. Variable length, not nillable, not composite, choice 15. Variable length, not nillable, composite, no choice 16. Variable length, not nillable, composite, choice There is one more variable: cardinality. A field may be optional, required, or repeatable. The DFDL properties for specifying cardinality are the same regardless of category, i.e., for fields with cardinality (0,1) (optional) the same DFDL properties are applied regardless of whether the field is fixed length, nillable, not composite, no choice (category 1) or variable length, not nillable, composite, choice (category 16). In this chapter I describe how to create DFDL for each of the 16 categories of fields. Following that I describe how to specify the field's cardinality using DFDL.