Hi,
I have written a XMLSchema which looks like the one below. The idea is that baseContainer only allows some tags and fullContainer allows all tags in baseContainer + some other tags. The tags may come in any order and there can be multiple of all the tags. In my real sample there is a lot more tags so this method of write XMLSchema tends to become big and unstructured. I want to use XMLSchema extension tag to structure the doc but it do not work as I expect.
Thanks in advance :)
<complexType name="baseContainer">
<sequence minOccurs="0" maxOccurs="unbounded">
<choice minOccurs="0" maxOccurs="1">
<element ref="w:aTag0"/>
<element ref="w:aTag1"/>
<element ref="w:aTag2"/>
</choice>
</sequence>
</complexType>
<complexType name="fullContainer">
<sequence minOccurs="0" maxOccurs="unbounded">
<choice minOccurs="0" maxOccurs="1">
<element ref="w:aTag0"/>
<element ref="w:aTag1"/>
<element ref="w:aTag2"/>
<element ref="w:aTag3"/>
<element ref="w:aTag4"/>
</choice>
</sequence>
</complexType>
I have tried this:
<complexType name="fullContainer">
<complexContent>
<extension base="w:baseContainer">
<sequence minOccurs="0" maxOccurs="unbounded">
<choice minOccurs="0" maxOccurs="1">
<element ref="w:aTag3"/>
<element ref="w:aTag4"/>
</choice>
</sequence>
</extension>
</complexContent>
</complexType>