I am a new user of Castor, as opposed to a developer of Castor, so I am not
sure if this is the appropriate place to send my question. I did not see a
mailing list specifically targeted towards users. If there is one, I would
appreciate it if someone would point me to it.
I have a schema that includes the following type definition:
<xsd:simpleType name="ColorType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Black"/>
<xsd:enumeration value="Gray"/>
<xsd:enumeration value="Light Gray"/>
<xsd:enumeration value="White"/>
</xsd:restriction>
</xsd:simpleType>
Running the source generator tool results in the creation of the file
ColorType.java with the following lines:
public static final ColorType VALUE_1 = new ColorType(VALUE_1_TYPE,
"Gray");
public static final int VALUE_2_TYPE = 2;
public static final ColorType VALUE_2 = new ColorType(VALUE_2_TYPE,
"Light Gray");
It appears that if there is a space present in any of the enumeration
values, in this case "Light Gray", the source generator will generate class
constants with "VALUE" names.
Instead of class constants with names like VALUE_1, VALUE_2, and
VALUE_2_TYPE, I want them to be named GRAY, LIGHT_GRAY, and LIGHT_GRAY_TYPE.
Is there a way to do this without changing the schema?
I am using Castor 0.9.4.3.
Thanks for any help.
Mike Carlin