plurality wrong for nested choice model groups
Brought to you by:
pabigot
In the following schema (abstracted from wfs:FeatureTypeType), PyXB 0.5.1 incorrectly determines that "a" can appear multiple times.
<xs:complexType name="ftt">
<xs:sequence>
<xs:element name="a"/>
<xs:choice><xs:element name="b"/>
<xs:element name="c"/></xs:choice>
</xs:sequence>
</xs:complexType><
In the definition of _ _ fromModelGroup around line 940 of xmlschema/structures.py, change the branch for ModelGroup.C_CHOICE to read:
i.e. create one union map over all possible documents rather than one for each set of documents.
Previous suggestion works for the specific case, but still isn't right. Full solution is more complex and will be in 0.5.2.