I have to make a simple element that can be either be an integer or a date. The element I have to use is score
.
I've looked at a few links but I don't really understand.
Use xsd:union
to create new type consisting of the union of other xs:integer
and xs:date
:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="score">
<xs:simpleType>
<xs:union memberTypes="xs:integer xs:date"/>
</xs:simpleType>
</xs:element>
</xs:schema>