I find some infomation in http://castor.codehaus.org/xmlschema.html  below:
nonNegativeInteger       pattern        primitive int type
                                 totalDigits
                                fractionDigits
                                 maxInclusive
                                  maxExclusive
                               minInclusive
                              maxInclusive

Is that mean the type of nonNegativeInteger will be convert to int in java
object?
but My define is:
 <xsd:simpleType name="ID">
> >     <xsd:restriction base="xsd:nonNegativeInteger">
> >       <xsd:totalDigits value="15"/>
> >     </xsd:restriction>
> >   </xsd:simpleType>
the totalDigits value="15" is too large for int type
how can I handel this?
        




Werner Guttmann-4 wrote:
> 
> Sure. Can I ask you a few questions:
> 
> A) Is it correctt that you are using the XML code generator to create Java
> classes (and descriptor classes) from the XML schema ? 
> B) You seem to be saying that you are using the mapping tool to generate a
> mapping from the XML schema ? Somehow this sounds odd to me.
> C) I think there's already an existing issue in Jira that describes a
> similar problem related to code generation where the typüe of a member
> variable created as a result of an xs:int will be java.lnag.Integer, which
> is not sufficient to cover the value range as defined by the XML schema
> spec.
> 
> Werner
> 
>> -----Original Message-----
>> From: rain.xk [mailto:[EMAIL PROTECTED] 
>> Sent: Mittwoch, 22. November 2006 08:43
>> To: dev@castor.codehaus.org
>> Subject: Re: [castor-dev] about xsd definition
>> 
>> 
>> anyone help me ?
>> 
>> rain.xk wrote:
>> > 
>> > I have to parse a xsd file something like:
>> > <xsd:simpleType name="ID">
>> >     <xsd:restriction base="xsd:nonNegativeInteger">
>> >       <xsd:totalDigits value="15"/>
>> >     </xsd:restriction>
>> >   </xsd:simpleType>
>> > But,I have some problems,First the castor mappingfile which 
>> generated 
>> > by "org.exolab.castor.tools.MappingTool" define the ID 
>> element like :
>> >                  <field name="TEST" type="int" required="true">
>> >                    <bind-xml name="TEST" node="element" />
>> >            </field>
>> > but the int is -2147483648~2147483647  can't be <xsd:totalDigits 
>> > value="15"/>.If I hava a number like 400000000000002,it 
>> can't be parsed!
>> > The second problem is <xsd:totalDigits value="15"/> mean the number 
>> > must has 15 digits or less than 15 digits?
>> > 
>> 
>> --
>> View this message in context: 
>> http://www.nabble.com/about-xsd-definition-tf2677453.html#a7486446
>> Sent from the Castor - Dev mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>> 
>>     http://xircles.codehaus.org/manage_email
>> 
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/about-xsd-definition-tf2677453.html#a7486875
Sent from the Castor - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to