You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by "Costello, Roger L." <co...@mitre.org> on 2020/04/10 17:43:31 UTC

What's the difference between sequenceKind and floating?

Hi Folks,

sequenceKind = ordered means the items must occur in the order specified by the schema.

float = no means the items must occur in the order specified by the schema.

sequenceKind = unordered means the items can occur in any order.

float = yes means the items can occur in any order.

sequenceKind and float mean the same thing, yes? Then why have both?

/Roger

Re: What's the difference between sequenceKind and floating?

Posted by "Beckerle, Mike" <mb...@tresys.com>.
These things are not entirely equivalent. Floating is more restrictive than you think.

dfdl:floating is a property placed on an element within an ordered sequence, and allows element(s) (usually just 1) having that property to float around within the sequence, but the remaining elements which do not have that property cannot float and must appear in order.

So, it's a kind of limited unordering.  If you put dfdl:floating on every element within an ordered sequence, then yes, it behaves like an unordered sequence.

I can't recall the specific formats that this DFDL feature was invented to cover, but I vaguely recall they had only 1 floating element in what are otherwise ordered sequences.

The dfdl:floating property is not implemented in Daffodil. One can work around it by just modeling a sequence that has a floating element in it as a fully unordered sequence. You do lose something in robustness of the parsing that way, it might accept data as well-formed that is really malformed.

I've asked the other dfdl-workgroup members for information about the formats that floating was intended to support. I'll report back when I hear something.


________________________________
From: Costello, Roger L. <co...@mitre.org>
Sent: Friday, April 10, 2020 1:43 PM
To: users@daffodil.apache.org <us...@daffodil.apache.org>
Subject: What's the difference between sequenceKind and floating?

Hi Folks,

sequenceKind = ordered means the items must occur in the order specified by the schema.

float = no means the items must occur in the order specified by the schema.

sequenceKind = unordered means the items can occur in any order.

float = yes means the items can occur in any order.

sequenceKind and float mean the same thing, yes? Then why have both?

/Roger