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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Infinity

Yes, the spec is correct on this point. Every integer has a finite
length representation. The infinite part refers to the number of
integers, not the length of each integer's string representation.

Now because it's infinite, there is no longest string. Given any
string you claim is the longest, I add one more digit and thus have a
longer string. Therefore there can be no longest string.

I suspect the "finite length" verbiage is there to prevent someone
from feeding a parser an unending stream of digits. It's not
mathematically necessary.

On Sat, Mar 3, 2018 at 4:22 AM, Michael Kay <mike@saxonica.com> wrote:
> A question of no practical relevance for those on the list who are more
> mathematically inclined than I am.
> From XSD 1.1 part 2 §3.3.13
> (a) The ·value space· of integer is the infinite set {...,-2,-1,0,1,2,...}.
> (b) integer has a lexical representation consisting of a finite-length
> sequence of decimal digits (#x30-#x39) with an optional leading sign.
> So the value space is infinite, but the lexical space is finite. Or is it?
> Perhaps the set of finite-length strings is itself infinite?
> Does every integer in this infinite set have a finite-length lexical
> representation? Or are there integers in the value space that have no
> representation in the lexical space?
> Whenever I read this, I think, why is that adjective "finite-length" there?
> Would I have to change my software if it were removed?
> Michael Kay
> Saxonica

Elliotte Rusty Harold

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

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

Copyright 1993-2007 XML.org. This site is hosted by OASIS