Preserve all repeatable choices
Currently we generate compound fields only when it's absolutely necessary in order to maintain elements ordering between roundtrips. It would be nice to have an option to always group together choice elements just to be explicit with what is truly expected.
Original issue #561
Blocking issues
I have a couple of blocking cases that unfortunately I can't seem to find a proper way to tackle them
- repeatable sequences
<xsd:group name="G1">
<xsd:choice>
<xsd:sequence>
<xsd:element name="date" type="xsd:date"/>
<xsd:element name="marked" type="xsd:boolean"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element name="num" type="xsd:int"/>
</xsd:sequence>
</xsd:choice>
</xsd:group>
- Repeatable groups
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element ref="ipo:ExternFirstElement"/>
<xsd:choice>
<xsd:group ref="ipo:shipAndBill"/>
<xsd:element name="singleAddress" type="ipo:AddressType"/>
</xsd:choice>
<xsd:element ref="ipo:comment" minOccurs="0"/>
<xsd:element name="items" type="ipo:ItemsType"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
One approach would be to identify these cases and fallback to the original simplify case??? I 've been thinking this one for days now...
This was addressed in #747