I am trying to extend an XML schema to change the number of times a child can occur under an element.
In the original schema, the parent type is defined as such:
<xsd:complexType name="CrimeLineBusiness_Type">
<xsd:complexContent>
<xsd:extension base="PCLINEBUSINESS">
<xsd:sequence>
<xsd:element ref="CrimeSchedule" minOccurs="0"/>
<xsd:element ref="CrimeMoneyAndSecurities" minOccurs="0"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
I want to make it so both CrimeSchedule
and CrimeMoneyAndSecurities
are repeating elements. I thought this might work (inside of xsd:redefine
):
<xsd:complexType name="CrimeLineBusiness_Type">
<xsd:complexContent>
<xsd:extension base="CrimeLineBusiness_Type">
<xsd:sequence>
<xsd:element ref="CrimeMoneyAndSecurities" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="CrimeSchedule" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
However, then I get the following error:
cos-nonambig: CrimeSchedule and CrimeSchedule (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.
This makes sense, sine those children were indeed defined in the original schema. So, how can I accomplish what I need to do?
Thanks!