xmlxsdbiztalkredefine

Remove Duplicate Data from XML while using redefine in BizTalk


I have a schema which is formed by redefining 2 schemas

enter image description here

Now I have called this schema to another using redefine to add elements to Extn. But the elements from previous schema is repeating with the added element.

enter image description here

The Elynx Address is the added element. So how to remove the extra data or add element without repeating. The code to redefine used is :

xs:redefine schemaLocation="InheritSchema.Redefine">
    <xs:complexType name="commAddress">
      <xs:complexContent mixed="false">
        <xs:extension base="commAddress">
          <xs:sequence>
            <xs:element name="ElynxAddress" type="ElynxAddress" maxOccurs="1"/>
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:redefine>

The complex type ElynxAddress is given as :

<xs:complexType name="ElynxAddress">
    <xs:sequence>
      <xs:element name="Street" type="xs:string" />
      <xs:element name="State" type="xs:string" />
      <xs:element name="County" type="xs:string" />
      <xs:element name="Zip" type="xs:int" />
    </xs:sequence>
  </xs:complexType>

Solution

  • Thanks for helping. The particular schema when imported in another schema, does not shows the repeated element. So the issue is solved. :D