With EDI formats we reach the peak of complexity in describing file formats. In addition to describing the grammar of segments and transaction sets, we also need information about various delimiters and values for things like sender and receiver IDs.
It should come as no surprise that our X12 file description document has three major sections, each represented by an Element that is an immediate child of the root Element.