This is my schema file:
<xs:element name="elementname">
<xs:complexType/>
</xs:element>
Currently, the file which validating:
<ElementDef name="elementname" visible="false">
<elementname/>
</ElementDef>
But now I want this schema to accept this also the previous schema (i.e. I want some kind of choice that it accepts meta tag also if it has any)
<ElementDef name="elementname" visible="false">
<Section>
<Sequence>
<SectionType name="meta">
</Sequence>
</Section>
<elementname/>
</ElementDef>
This is what I have tried, but doesn't work:
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Section" minOccurs="0">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Sequence" minOccurs="0">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="friendly" type="xs:string" use="optional"/>
<xs:attribute name="style" type="xs:string" use="optional"/>
<xs:attribute name="numbering" use="optional">
</xs:complexType>
</xs:element>
</xs:choice>
</xs:element>
</xs:choice>
</xs:complexType>
Please let me know if you have any suggestions.