Two things:
1) I think the INTEGER case is already handled -- if the value parses to an int, the enumerated value will be VALUE_{int}.
2) An enhancement request would be the right way to go. Allow me to suggest, though, that you do it yourself and contribute the code back. If you look at the method added by the patch in bug 1245 (translateEnumValueToIdentifier), it should be easy to add your check for a float and handle it appropriately.
Rhett
[EMAIL PROTECTED] wrote:
Just a follow up msg to let everyone know that I resolved this problem. It turns out that the underscores was not the problem (at least with the CVS version of Castor - it may still be a problem with the 0.9.5.2 release though) It was a problem with hyphens and numbers in the enums in my schema. Hyphens are clearly invalid so I changed the hypens to underscores and that works fine.
However, it would be nice if Castor created more readable enumerations for integers and decimal numbers.
e.g.
<xsd:simpleType name="dpiType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="300"/>
<xsd:enumeration value="600"/>
<xsd:enumeration value="1200"/>
</xsd:restriction> </xsd:simpleType>
could generate ---> INTEGER_600, INTEGER_1200
<xsd:simpleType name="exchangeRateType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1.56"/>
<xsd:enumeration value="1.89"/>
</xsd:restriction> </xsd:simpleType>
could generate ---> DECIMAL_1_56, DECIMAL_1_89
The prefixes can be different but I think this is much more readable than VALUE_0, VALUE_1, etc...
Should I add an enhancement request in BugZilla>
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
