Following is the sample schema I used to try to generate the JAXB classes. What I noticed is that when I have a string type with enumerations, for instance, in my case the stepType, with values starting with a numeral, JAXB does not generate a separate enum class say StepType class. It works fine, when I use only alphabets for the value. Could someone tell whether this is a known bug please?
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
<xsd:element name="WorkoutSchedule" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="WorkoutSchedule" minOccurs = "0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ScheduleItem" minOccurs="1" maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Step" minOccurs="1" maxOccurs="1" type="stepType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="stepType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1stStep"></xsd:enumeration>
<xsd:enumeration value="2ndStep"></xsd:enumeration>
<xsd:enumeration value="3rdStep"></xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>