|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: datatype non-proliferation and disarmament
[Elliotte Rusty Harold] > At 9:23 PM -0400 5/13/02, Thomas B. Passin wrote: > > > >I assume the next question is why xs:integer is not a primitive in W3C > >XML Schema to which the answer is that it is derived from xs:decimal > > > >What exactly is your problem with this? > > > >[Tom P] > > > >Aside from the fact that it is mathematically wrong, even if lexically OK? > > I don't see an objection on mathematical grounds. The integers are a > proper subset of the rational numbers. Why would you claim this is > *mathematically* wrong? I suppose we shouldn't get into it, but I've been under the impression that, with integers being defined by set operations, as is the modern wont (there is a first integer, and each integer has exactly one successor, which is greater than its predecessor), you actually get something different from rational numbers in general, even though the values of the integers do equal the values of a subset of rational numbers. After all, you can't say that 10.0 has exactly one successor, or exactly any number of successors. And you can't get the special set-theoretic properties (I don't think) just by restricting the lexical form. But I may just be showing my ignorance here... And in practice, for use in XML schema, it wouldn't matter anyway, as I realized in about 10.0 seconds after I read that part of the spec. Let's just forget it, shall we? Still, if you were to be consistent, you might think you should represent an xsd integer by a floating point number restricted to certain integer values (since it is a restriction on real numbers). There's nothing in the spec to say that an integer representation in the computer is expected. Implementors would have to use other knowledge (not the xml schema spec) to know this. As I think on it, the xsd definition of integer doesn't map to any computer binary integer representations anyway (shades of Amy!) since the size is not constrained. You have to use a long or define your own short or some such, to get a standard binary-representable type. Oh, well. Cheers, Tom P
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








