Is "2147483647" the maximum value that maxOccurs can handle? What is the maximum value that maxOccurs can handle? Setting a maxOccurs value to unbounded can lead to resources exhaustion and ultimately a denial of service
Here an example XSD with the maxOccurs set to what I think is the Maximum value that maxOccurs can handle please verify:
mySchema.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="family">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="person" maxOccurs="2147483647">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="age" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="address" type="xs:string" minOccurs="1"/>
</xs:choice>
</xs:complexType>
</xs:element>