Here's the trick:

dfdl:choiceDispatchKey='{ if (Continuation_Record_Number gt 1) then 2 else
1 }'

Then you only have choice branches for 1 and for 2.


On Thu, May 18, 2023 at 8:58 AM Roger L Costello <coste...@mitre.org> wrote:

> I read one character from the input and use it to populate
> Continuation_Record_Number:
>
> <xs:element name="Continuation_Record_Number" type="validString"
> dfdl:lengthKind="explicit" dfdl:length="1" />
>
> If the value that was read is 0 or 1, then the remaining input contains
> data for vhf_navaids. If the value is greater than 1, then the remaining
> input contains data for vhf_navaids_continuation:
>
> <xs:choice dfdl:choiceDispatchKey='{Continuation_Record_Number}'>
>     <xs:sequence dfdl:choiceBranchKey="0 1">
>         <xs:group ref="vhf-navaids"/>
>     </xs:sequence>
>     <xs:sequence dfdl:choiceBranchKey="greater than 1">
>         <xs:group ref="vhf-navaids-continuation"/>
>     </xs:sequence>
> </xs:choice>
>
> Two questions:
>
> 1. The specification says that the value of choiceBranchKey is a "List of
> DFDL String Literals". Is the correct way to express the list 0, 1 like
> this:
>
>     dfdl:choiceBranchKey="0 1"
>
> 2. How to express this value for choiceBranchKey: any value greater than 1
>
>
>

Reply via email to