I want to define an XSD to have the enums as define in java like
YES(Y), NO(N)
But I coundn't find a way to do that
How ever I saw this , in example 2, they defined what I need but I coundn't find any example for this
//Example: code fragment
@XmlType
@XmlEnum(Integer.class)
public enum Coin {
@XmlEnumValue("1") PENNY(1),
@XmlEnumValue("5") NICKEL(5),
@XmlEnumValue("10") DIME(10),
@XmlEnumValue("25") QUARTER(25) }
<!-- Example: XML Schema fragment -->
<xs:simpleType name="Coin">
<xs:restriction base="xs:int">
<xs:enumeration value="1"/>
<xs:enumeration value="5"/>
<xs:enumeration value="10"/>
<xs:enumeration value="25"/>
</xs:restriction>
</xs:simpleType>