Hello DFDL community,

Unfortunately, Daffodil does not currently support 
dfdl:sequenceKind="unordered".

Does the below graphic accurately show how unordered sequences would be parsed 
and unparsed?

[cid:image003.png@01D57695.D99C6E10]

From: Beckerle, Mike <mbecke...@tresys.com>
Sent: Monday, September 23, 2019 1:55 PM
To: users@daffodil.apache.org
Subject: [EXT] Re: Is <xs:sequence dfdl:sequenceKind="unordered"> equivalent to 
<xs:all>?

An unordered sequence is not entirely equivalent to an xs:all group.

Specific differences are that while the representation is unordered in DFDL, 
the logical structure is ordered. On unparsing the order the data will come out 
will match schema order. The order that the data was in when parsed is lost, 
and not maintained anywhere.

If the order things appeared in matters and needs to be preserved, then you 
need to model the data as an array element containing a choice, with the 
members of the unordered sequence instead appearing as the members of this 
choice. The array element preserves the order that the data arrived in.


________________________________
From: Costello, Roger L. <coste...@mitre.org<mailto:coste...@mitre.org>>
Sent: Monday, September 23, 2019 1:48 PM
To: users@daffodil.apache.org<mailto:users@daffodil.apache.org> 
<users@daffodil.apache.org<mailto:users@daffodil.apache.org>>
Subject: Is <xs:sequence dfdl:sequenceKind="unordered"> equivalent to <xs:all>?


Hello DFDL community,



I realize that DFDL does not allow <xs:all>



But if it did, would the below be equivalent?



<xs:element name="input">
    <xs:complexType>
        <xs:sequence dfdl:sequenceKind="unordered">
            ...
        </xs:sequence>
    </xs:complexType>
</xs:element>

<xs:element name="input">
    <xs:complexType>
        <xs:all>
            ...
        </xs:all>
    </xs:complexType>
</xs:element>


Reply via email to