Hello DFDL community,

My input file has a number (num), followed by a comma-separated pair of values, 
enclosed within either round parentheses, square parentheses, or no parentheses.


  *   If num=1 then the initiator and terminator are rounded parentheses.
  *   If num=2 then the initiator and terminator are square parentheses.
  *   If num=3, 4, 5, ... then there is no parentheses.

The below DFDL schema works for num=1, num=2, and num=3. But it is silent on 
other values of num (4, 5, ...). Is there a way to have a choiceBranchKey for 
multiple values, e.g.,

                dfdl:choiceBranchKey="3...infinity"

<xs:element name="input">
    <xs:complexType>
        <xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="infix">
            <xs:element name="num" type="xs:integer" />
            <xs:choice dfdl:choiceDispatchKey="{ ./num }">
                <xs:element name="A" type="xs:string"
                                dfdl:initiator="(" dfdl:terminator=")"
                                dfdl:choiceBranchKey="1" />
                <xs:element name="B" type="xs:string"
                                dfdl:initiator="[" dfdl:terminator="]"
                                dfdl:choiceBranchKey="2" />
                <xs:element name="C" type="xs:string"
                                dfdl:initiator="%WSP*;" dfdl:terminator="%NL;"
                                dfdl:choiceBranchKey="3" />
            </xs:choice>
        </xs:sequence>
    </xs:complexType>
</xs:element>

Reply via email to