Apache Daffodil parsing optional elements

19 Views Asked by At

I am new to Apache Daffodil and I am trying to find the best practice for reading document of this structure

0100AAABBBCCC[%CR;%LF;]
...

0100 initiator AAA, BBB, CCC fixed size fields which are optional (this is the case for all fields present)

Each of these fields can be shorter but when present have the length of 3

0100AA BB CCC[%CR;%LF;]

If the field at the end is shorter it is not full length

0100AA BB CC[%CR;%LF;]

or when the fields are missing at the end, all after last present is truncated

0100AA[%CR;%LF;]
0

There are 0 best solutions below