So how can I make an XML elements schema

So I want to have a custom type that can have the values Fast, Medium, Slow and Wobbly, how can I do this with XSD?
1 Reply
Trinitek
Trinitek3y ago
xs:choice or...
<xs:attribute name="style" default="info">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="info"/>
<xs:enumeration value="warning"/>
<xs:enumeration value="danger"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" default="info">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="info"/>
<xs:enumeration value="warning"/>
<xs:enumeration value="danger"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
will let you specify it as an attribute on the element
Want results from more Discord servers?
Add your server