You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The DFDL specification allows for each branch of a direct dispatch choice to specify only a single choiceBranchKey.

The current Daffodil implementation extends this behavior to make the dfdl:choiceBranchKey annotation specify a space delimited list of keys.

This proposal further extends branchKeys by adding a dfdl:choiceBranchKeyRanges annotation. dfdl:choiceBranchKeyRanges is a space delimited list of integers, interperated as "min1 max1 min2 max2 ... minN maxN". It will match to any integer contained in any of the specified ranges.

Logically, setting dfdl:choiceBranchKeyRanges="a b" is equivelent to dfdl:choiceBranchKey="a a+1 a+2 ... b"; although using choiceBranchKeyRanges may allow for a more efficient implementation.

choiceBranchKeyRanges and choiceBranchKey may be used at the same time. In such a case, both must specify only integers.

This feature may be thought of as analogous to the repValueRanges annotation in the enum/typeCalc proposal.

  • No labels