I'm not able figure out how to express the following with Xsd: an elment with a simpleType restriction (enumeration of values) and require an attribute on this element. For example:
<myElement some_id_value="1">Apples</myElement>
Where the simple type is defined as:
<xs:simpleType name="simpleType_Fruit">
<xs:restriction base="xs:string">
<xs:enumeration value="Apples" />
<xs:enumeration value="Bananas" />
<xs:enumeration value="Oranges" />
</xs:restriction>
</xs:simplType>
My element right now is defined as:
<xs:element name="myElement" type="simpleType_Fruit"/>
A similar question asked here, and may be answered, but I'm not sure (there is only a single plus vote on the answer)