Edit: This is not a dupe of my last question as I didn't want to do both at the same time anymore.
I want to specify that my setting node has either :
<setting name='Some Setting'>
SomeData
</setting>
schema is :
<xs:element name="setting">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
or
<setting name='Some Setting'>
<value>SomeData</value>
</setting>
schema is:
<xs:element minOccurs="0" name="setting">
<xs:complexType>
<xs:sequence>
<xs:element name="value" type="xs:string" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
but not both.
I can't figure out how to combine them in the overall schema. I've tried using <xs:choice />
but that complains that the elements with the same name need be of the same type