For agenda/issues list

With respect to lengthKind='prefixed'. I'm concerned that there's a complex interaction with initiator/terminator.

Can we have a prefix length and an initiator and terminator as well? If so which comes first, and if it's the prefix does the prefix length include the length of the initiator and terminator?

The grammar as written in current draft of spec has the initiator first, then the prefix, then the content, and then the terminator. I think this is wrong. I mean we can make it work, but it's not a useful, nor intuitive behavior.

If we're going to fix this, I think we should make prefixed an alternative to initiator and terminator, so that you can't have both on the element.

The alternative is to change the order around. Because initiator and terminator can each be lists of alternative choices, the only sensible composition of prefixed with these has prefix length providing the length of a syntax which includes static initiator and terminator fields, which are sort of like static padding to be trimmed off the string before extracting the value.

E.g., prefix length of 10 preceeding these characters: [[123456]]

<element name='x' type='int' dfdl:initiator="[[" dfdl:terminator="]]" dfdl:lengthKind='prefixed' .../>

But,....this is obscure enough that I'd rather make prefix length exclusive of initiator/terminator. I.e. Schema Def Error if both are specified.

Rationale: Even if such formats are possible, and even if they do exist somewhere, it's possible to model this format differently with hidden fields, lengthKind='explicit' etc., so it's not like removing this complex interaction of prefix with initiator/terminator reduces DFDL's expressive power in any way.

Summary: To reduce complexity, suggest that lengthKind='prefixed' is exclusive of both initiator and terminator properties directly on the same element. Schema Definition Error if both are specified.


--
Mike Beckerle | OGF DFDL WG Co-Chair 
Tel:  781-330-0412