document #299

Clarify choice branch behaviour when occursCountKind 'expression' and 'parsed'.

Added by Steve Hanson over 3 years ago. Updated about 1 year ago.

Status:submitted Start date:09/22/2015
Priority:Normal Due date:
Assignee:Steve Hanson % Done:

50%

Category:-
Target version:DFDL v1.0
Document Type:Proposed Recommendation

Description

It is not clear what the correct outcome should be in a choice where a branch is optional or an array, and dfdl:occursCountKind is 'expression' and the count resolves to zero or is 'parsed' and zero occurrences are found.

a) resolve the choice to the zero length array
b) move to the next choice branch
c) throw an error

History

Updated by Steve Hanson over 3 years ago

  • % Done changed from 0 to 100

The existing choice branch rule that says minOccurs must not be 0 should remain, for consistency with not allowing minOccurs 0 on the choice itself.

Choice branch with dfdl:occursCountKind 'expression' should be allowed. If the expression resolves to 0 then there are no occurrences and the branch is missing, so the parser looks for the next branch. This preserves the rule that a branch must exist.

Choice branch with dfdl:occursCountKind 'parsed' should be allowed. If the parser does not find any occurrences then the branch is missing, so the parser looks for the next branch. This preserves the rule that a branch must exist.

Updated by Steve Hanson over 1 year ago

  • % Done changed from 100 to 50

Updated by Steve Hanson about 1 year ago

  • Target version set to DFDL v1.0

Due to elapsed time since raised, need to verify the conclusions

Also available in: Atom PDF