I need to create XSD document with restriction so that we only allow the following values in the XML element.
3"
30"
5" x 18"
4" X 12"
Other
I started creating an element with restriction with enumeration but I do not know how to specify quotes in the enumeration.
I tried adding restriction with "e;
, '"'
, \"
but nothing is working.
<xs:element name="Diameter">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="3"e;" />
<xs:enumeration value="30"e;" />
<xs:enumeration value="5"e; x 18"e;" />
<xs:enumeration value="4"e; x 12"e;" />
<xs:enumeration value="other" />
</xs:restriction>
</xs:simpleType>
</xs:element>
Use "
, not "e;
Alternatively, use '
... '
to deliminate the attribute values, then "
internally:
<xs:enumeration value='3"' />