Forums » #117 - DFDL v1.0 Revision »
Separator suppression - terminology descriptions can be clearer
Added by Michael Beckerle about 9 years ago
Definitions of Potentially Trailing things mention "enclosing group", but choices don't qualify. A group in XSD is a sequence or a choice, so if we mean enclosing sequence, we can't slide by with enclosing group.
We need to to a complete pass through the spec, searching for uses of the word group. All such should mean "sequence or choice", or should be changed to one of those otherwise.
My edits for section 14.2.1 are here in colored background:
Potentially trailing element – An array or optional element describes an occurrence that is said
to be potentially trailing if the element is capable of having a zero length representation and is
followed in its enclosing sequence definition by only additional potentially trailing elements or
potentially trailing groups. Intuitively, the array or optional element occurrence could be last.
Potentially trailing group – A group is said to be potentially trailing if the group has no framing
and contains only potentially trailing element declarations/references, or recursively similar
sequence or choice groups, and is followed in its enclosing sequence definition by only additional
potentially trailing elements or potentially trailing groups.
The spec says: Trailing or Actually Trailing – An element occurrence or group occurrence in the data is said to
be actually trailing if it is potentially trailing and has zero-length representation and is not followed
in the data by any other non-zero length element occurrence or group occurrence limited by the end of the enclosing sequence group.
The phrase "followed in its enclosing group definition..." is meaningless if the enclosing group is a choice, as choice alternatives don't have an ordering relationship that corresponds to physical position in the data.
All of these definitions are flawed in the following sense. When we say last, we mean "last represented" in almost all cases, because another element following, which has an inputValueCalc doesn't count, nor a sequence group with no framing, containing only elements with inputValueCalc or similar sequences, nor an element with complex type having only that stuff, etc.
So it seems we need the more general concept of "is represented" in the spec, so that when we say "last" we can be clear.
Another definition in the spec says: Trailing or Actually Trailing "... is not followed in the data by any other ...". This is unclear because "is not followed in the data" doesn't express any limit at all. What we mean here is up to the end of the sequence group whose children/separators are under discussion.
Replies (7)
RE: Separator suppression - terminology descriptions can be clearer - Added by Michael Beckerle about 9 years ago
Colored background mentioned above to highlight suggested changes was lost in this public comment.
Here are those sections with underline for the suggested changes.
Potentially trailing element – An array or optional element describes an occurrence that is said
to be potentially trailing if the element is capable of having a zero length representation and is
followed in its enclosing sequence definition by only additional potentially trailing elements or
potentially trailing groups. Intuitively, the array or optional element occurrence could be last.
Potentially trailing group – A group is said to be potentially trailing if the group has no framing
and contains only potentially trailing element declarations/references, or recursively similar
sequence or choice groups, and is followed in its enclosing sequence definition by only additional
potentially trailing elements or potentially trailing groups.
Trailing or Actually Trailing – An element occurrence or group occurrence in the data is said to
be actually trailing if it is potentially trailing and has zero-length representation and is not followed
in the data by any other non-zero length element occurrence or group occurrence limited by the end of the enclosing sequence group.
RE: Separator suppression - terminology descriptions can be clearer - Added by Michael Beckerle about 9 years ago
To do: work out wording for exclusion of inputValueCalc case.
The fact that a sequence or choice with no framing will get a separator is a corner case obscure enough that this behavior is ok.
RE: Separator suppression - terminology descriptions can be clearer - Added by Michael Beckerle about 9 years ago
Reworded to cover the calculated element (dfdl:inputValueCalc) case:
Here are those sections with underline for the suggested changes.
Potentially trailing element – An array or optional element describes an occurrence that is saidto be potentially trailing if the element is capable of having a zero length representation and is
followed in its enclosing sequence definition by only these kinds of schema components:
- calculated elements (those having dfdl:inputValueCalc)
- additional potentially trailing elements
- potentially trailing groups
Intuitively, the array or optional element occurrence could be last.
Potentially trailing group – A group is said to be potentially trailing if the group has no framing
and contains only potentially trailing element declarations/references, or recursively similar
sequence or choice groups, and is followed in its enclosing sequence definition by only additional
potentially trailing elements or potentially trailing groups.
Trailing or Actually Trailing – An element occurrence or group occurrence in the data is said to
be actually trailing if it is potentially trailing and has zero-length representation and is not followed
in the data by any other non-zero length element occurrence or group occurrence limited by the end of the enclosing sequence group.
Resolved RE: Separator suppression - terminology descriptions can be clearer - Added by Michael Beckerle about 9 years ago
New language from prior comment accepted 2013-10-08
Resolved: Separator suppression - terminology descriptions can be clearer - Added by Steve Hanson over 8 years ago
New erratum 4.18 in experience document 1, updates made to experience document 2.
DONE - RE: Separator suppression - terminology descriptions can be clearer - Added by Michael Beckerle over 8 years ago
Changes in draft-gwdrp-dfdl-v1.0.4-r06.docx
DONE - RE: Separator suppression - terminology descriptions can be clearer - Added by Steve Hanson about 8 years ago
(1-7/7)