Hi,
after upgrading to 0.9.5.3 and regenerating our xml classes, it seems that castor
doesn't generate correct code for type definitions using restrictions for xsd:int. The
xml fragment looks like this:
<xsd:element name = "PriceUnit" default="1" >
<xsd:simpleType>
<xsd:restriction base = "xsd:int">
<xsd:enumeration value = "1"/>
<xsd:enumeration value = "10"/>
<xsd:enumeration value = "100"/>
<xsd:enumeration value = "1000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Obviously, this only fails when using anonymous types (as above), when creating
explicitly a PriceUnitType based on xsd:int, then it works perfect. In case of the
example above, castor creates code like this (doesn't compile):
/**
* Field _priceUnit
*/
private int _priceUnit = int.valueOf("1");
/**
* Returns the value of field 'priceUnit'.
*
* @return the value of field 'priceUnit'.
*/
public int getPriceUnit()
{
return this._priceUnit;
} //-- int getPriceUnit()
Thanx in advance
Nick
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev