LinqToXsdCore
LinqToXsdCore copied to clipboard
maxOccurs="unbounded", is not respected for elements in choice block
trafficstars
When adding a second Document element to a MsgHead element defined in the following schema:
<element name="MsgHead">
<complexType>
<sequence>
<element ref="mh:MsgInfo"/>
<choice>
<element ref="mh:Document" maxOccurs="unbounded"/>
<element ref="mh:PatientReport" maxOccurs="unbounded">
<annotation>
<documentation>xxx</documentation>
</annotation>
</element>
</choice>
<element ref="ds:Signature" minOccurs="0"/>
</sequence>
</complexType>
</element>
the previous entry is removed.
This is happening in .\LinqToXsdCore\XObjectsCore\API\ChoiceContentModelEntity.cs when a call is made to this.RemoveChoices (line 20).
The maxOccurs="unbounded" does not seem to be respected.