I am trying to use data within an element without breaking this element existing contract.
Let's simplify my case:
<xs:element name="ExistingContract">
<xs:complexType>
<xs:sequence>
<xs:element name="first" type="FirstType"/>
<xs:element name="second" type="SecondType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NewContract">
<xs:complexType>
<xs:sequence>
<xs:element name="first" type="FirstType"/>
<xs:element name="second" type="SecondType"/>
<xs:element name="additionalData" type="AdditionalDataType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
These two inner types are duplicated, and I want to avoid it. Since there isn't any existing wrapping xs:complexType
for the inner data, I can take it out from ExistingContract
and use it in my NewContract
. But then I will break the first contract (which I don't want to).
Are you familiar with any XSD method that I can keep the first contract the same and extract its inner data to my new contract?