[Nsi-wg] Change of xsd:int for large numbers

John MacAuley john.macauley at surfnet.nl
Wed Jul 31 23:57:28 EDT 2013


I used the standard Sun jaxb compiler on the schema with an xsd:unsignedLong and it generated a BigInteger.  I tried it with an xsd:long and it generated a java long for capacity and a Long object for mtu and burst size since they are optional.  I will go with the long as you suggest.

John

On 2013-07-30, at 11:53 PM, Katsuhiko OHKUBO <ohkubo-k at suri.co.jp> wrote:

> Hi John,
> 
> (2013/07/31 9:12), John MacAuley wrote:
>> Is anyone against me changing these to an integer or perhaps  nonNegativeInteger?
> 
> I prefer xsd:long or xsd:unsingedLong (64 bit integer),
> and they seem enough for the purrpose.
> 
> Here is the mapping of xsd and Java types.
> http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html
> 
> In Java, xsd:integer and xsd:nonNegativeInteger will be BigInteger object.
> Java programmers must write such as
> 	BigInteger x = BigInteger.valuof(1000);
> 	BigInteger y = ...;
> 	BigInteger z = x.add(y);
> It's too complicated...
> 
> Thanks
> 
> -- 
> Katsuhiko OHKUBO ookubo-k at aist.go.jp
> _______________________________________________
> nsi-wg mailing list
> nsi-wg at ogf.org
> https://www.ogf.org/mailman/listinfo/nsi-wg



More information about the nsi-wg mailing list