[DFDL-WG] [wg-all] Repeating groups in DFDL

Ryan Farrell ryan.farrell.ctr at nrl.navy.mil
Tue Jul 19 13:12:05 CDT 2011


For anyone that was at the 19/07  phone meeting, this is what Adam Fox 
and I were trying to find a solution to. If anyone knows of a solution, 
please contact me or adam.fox at nrl.navy.mil.

----------------------------------------------------------------------------------------------------

Please see the attached xml schema while reading this message.

The problem we want to solve is how to represent a structure that can 
have a variable amount of occurences (even zero), and the amount of 
repeats is controlled by a one bit field, which we will call"repeatBit". 
The repeating structure in this case is "A1". The element before it, 
"presentBit", determines if there is at least one occurence of A1. If 
presentBit is zero, then A1 has zero occurences. If presentBit is one, 
then A1 has AT LEAST one occurence.

The first element in A1 is "repeatBit". What repeatBit does is tells us 
if there will be another occurence of A1 after the current occurence. 
When repeatBit is zero, then that means we will read through the rest of 
A1, then that is the last occurence of A1. As long as repeatBit 
continues to be one however, we will read through the rest of A1, then 
start a new occurence.

I have included all the known required DFDL notation. Please let me know 
what is missing.

        EXAMPLE INPUT (results are in base 10):
        NOTE: Not all bits are used in these examples. Unused bits 
should be ignored for the purpose of the examples.

        1) 0111 0101
        presentBit = 0
        aFieldAfterA1 = 3

        2) 1011 1010
        presentBit = 1
        A1
        -repeatBit = 0
        -someField = 3
        aFieldAfterA1 = 2

        3) 1101 0110 0000 0000
        presentBit = 1
        A1
        -repeatBit = 1
        -someField = 1
        A1
        -repeatBit = 0
        -someField = 3
        aFieldAfterA1 = 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repeat_example.xsd
Type: text/xml
Size: 3091 bytes
Desc: not available
Url : http://www.ogf.org/pipermail/dfdl-wg/attachments/20110719/03910761/attachment.xml 


More information about the dfdl-wg mailing list