Peter
Peter

Reputation: 31

XSD extension and add two new element and redefine one element

i have complext type

<xs:complexType name="example">
    <xs:sequence>
        <xs:element name="ID" type="TID"/>
        <xs:element name="area" type="xs:string"/>
        <xs:element name="category" type="xs:string">
    </xs:sequence>
</xs:complexType>

I need to reuse it as new complextType exampleExtended, add two new elements and make category optional, but im stucked. I tried extension, change one attribute and add two of them, but I still get duplicate category (one required, one optional). I need to get something like this

<example>
    <ID>temperat iras</ID>
    <area>regemque dedit</area>
    <!--Optional:-->
    <category>fremunt celsa</category>
    <!--Optional:-->
    <newElement1>10</newElement1>
    <!--Optional:-->
    <newElement2>10</newElement2>
</example>

Can somebody please help? Thank you

Upvotes: 0

Views: 16

Answers (0)

Related Questions