2.3.2.1 Choice Group Control and Choice Section Control

A choice group control that is bound to a group that contains two choice section controls that are bound to XML elements that are not required to be present and that contain no bound controls, MUST have the following complex type XSD definition:

 <xsd:element name="group1">
     <xsd:complexType>
         <xsd:choice minOccurs="0">
             <xsd:element ref="my:group2" minOccurs="0"/>
             <xsd:element ref="my:group3" minOccurs="0"/>
         </xsd:choice>
     </xsd:complexType>
 </xsd:element>
 <xsd:element name="group2">
     <xsd:complexType>
         <xsd:sequence/>
     </xsd:complexType>
 </xsd:element>
 <xsd:element name="group3">
     <xsd:complexType>
         <xsd:sequence/>
     </xsd:complexType>
 </xsd:element>

The previous definition assumes that the element name for the choice group control is "group1" and the element names for the choice section controls are "group2" and "group3".

A choice group control that is bound to a group (1) that contains two choice section controls that are bound to XML elements that are not required to be present, the first of which contains a text box control that is bound to an XML element with data type set to "string", and the second of which contains a check box control that is bound to an XML element with data type set to "boolean", MUST have the following complex type XSD definition:

 <xsd:element name="group1">
     <xsd:complexType>
         <xsd:choice minOccurs="0">
             <xsd:element ref="my:group2" minOccurs="0"/>
             <xsd:element ref="my:group3" minOccurs="0"/>
         </xsd:choice>
     </xsd:complexType>
 </xsd:element>
 <xsd:element name="group2">
     <xsd:complexType>
         <xsd:sequence>
             <xsd:element ref="my:field1" minOccurs="0"/>
         </xsd:sequence>
     </xsd:complexType>
 </xsd:element>
 <xsd:element name="field1" type="xsd:string"/>
 <xsd:element name="group3">
     <xsd:complexType>
         <xsd:sequence>
             <xsd:element ref="my:field2" minOccurs="0"/>
         </xsd:sequence>
     </xsd:complexType>
 </xsd:element>
 <xsd:element name="field2" nillable="true" type="xsd:boolean"/>

The previous definition assumes the element name for the choice group control is "group1" and the element names for the choice section controls are "group2" and "group3". The text box control and checkbox control contained by the choice section controls are assumed to be named "field1" and "field2" respectively.