Action 157 - nilKind logicalValue and nilValueDelimiterPolicy

Summary: nilKind logicalValue is an "in-band" kind of null indicator. Having separate delimiter rules for the distinguished null values is unnecessary complexity.

Discussion: As is, the spec allows these two properties to be combined in all ways. it is *possible* to implement combinations of nilValueDelimiterPolicy with nilKind logicalValue, it's just very complicated. Issuing quality diagnostic messages may be very difficult if the user specifies ambiguous formats.

Example: initiator="[" terminator="]" separator="," lengthKind="delimited" but the data contains commas also. as in 123.456,78. If the nilKind is logicalValue, and one of the nilValues is -1,0 then nilValueDelimiterPolicy must be "both" or the format won't parse because the initiators and terminator won't be present to separate the data commas from the separator commas.

Special case code in every DFDL implementation would have to deal with this ambiguity, so not only is there additional complexity in just writing a parser for correct and unambiguous DFDL schemas, if there are ambiguities like the above, there is yet further complexity in issuing a quality diagnostic message.  That is all not to mention the test cases needed to insure conformance.

In the absence of a use case motivating this complexity, it is worthwhile to rule this specific combination of properties out as a schema-definition error, or simply make the combination such that when logical nil values are used, the nilValueDelimiterPolicy is ignored. The conservative choice is one that lets us put back this capability in the future should we discover a viable use case for it. Hence, a schema-definition error is a better choice for the errata.

Suggested Errata Language:

When dfdl:nilKind="logicalValue" then dfdl:nilValueDelimiterPolicy must be "both". It is a schema-definition error otherwise. All values, including nil indicator values, will have initiators and terminators if those delimiters are specified. dfdl:nilValueDelimiterPolicy values other than "both" are usable only with dfdl:nilKind of "literalValue" and "literalCharacter".

TBD: should it apply to nilKind "literalCharacter" ?

Alternative:

When dfdl:nilKind="logicalValue" then dfdl:nilValueDelimiterPolicy is ignored. All values, including nil values, will have initiators and terminators if those delimiters are specified.

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