OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Re: datatype non-proliferation and disarmament

[ Lists Home | Date Index | Thread Index ]

[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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS