I'm currently trying to create an XSD where I have a which can have only on of the following values:
<media_type>wmv</media-type>
or
<media_type>h264</media_type>
or
<media_type>mov</media_type>
I have found the <xs:choice/>
element, but if I construct a complex type as such:
<xs:element name="media_type" type="xs:string">
<xs:complexType>
<xs:sequence>
<xs:element ref="h264"/>
<xs:element ref="wmv"/>
<xs:element ref="flash"/>
</xs:sequence>
<xs:attribute name="media_id" use="required" type="xs:integer"/>
</xs:complexType>
</xs:element>
It will look for elements under <media_type/>
. Is there a way to check the contents of an element in XSD?