This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1464 - [XSLT] Typo in formating a float?
Summary: [XSLT] Typo in formating a float?
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-18 19:06 UTC by Michael Rys
Modified: 2005-07-22 16:19 UTC (History)
0 users

See Also:


Attachments

Description Michael Rys 2005-05-18 19:06:11 UTC
16.4.4 Formatting the Number:

Should the following text 
"the one that is chosen should be one with the smallest possible number of 
digits not counting leading or trailing zeroes. (For example, 1.0 is preferred 
to 0.9999999999, and 100000000 is preferred to 100000001.) "

be

"the one that is chosen should be one with the smallest possible number of 
digits not counting leading or trailing zeroes. (For example, 1.0 is preferred 
to 0.9999999999, and 1.00000000 is preferred to 1.00000001.) "
?
Comment 1 Sharon Adler 2005-07-20 20:15:32 UTC
Michael, this was intentional - not a typo - thanks for your concern.
Comment 2 Michael Rys 2005-07-20 20:28:10 UTC
It may be better than to use 1.0E8 is preferred over 1.00000001E8.

Best regards
Michael
Comment 3 Michael Kay 2005-07-21 20:19:12 UTC
Clearly examples are non-normative, and are there only to help the reader to
understand the normative text. The normative text here is "the smallest possible
number of digits not counting leading or trailing zeroes", and the example
"100000000 is preferred to 100000001" was chosen deliberately to make it clear
that by "leading or trailing zeros" we mean significant as well as
non-significant leading or trailing zeros. Your alternative examples are
correct, but don't make the point that we were trying to make.

But thanks for your concern.

Michael Kay
(as Editor, XSLT 2.0)
Comment 4 Michael Rys 2005-07-21 20:29:01 UTC
Sorry, but this does not make sense as written. Leading and trailing zeros are 
normally understood to be only the ones that are insignificant. Since you say 
that the example is non-normative, you should make it clear in the normative 
part and explain in the example, that you count the zeros for 100000001 but 
not the ones in 10000000. 


Comment 5 Michael Kay 2005-07-21 21:35:35 UTC
It's precisely because many readers might wrongly assume that "leading and
trailing zeros" means "insignificant leading and trailing zeros" that we have
added examples to demonstrate that we mean exactly what we say, and not
something different that the reader might have assumed.

Michael Kay
Comment 6 Michael Rys 2005-07-21 21:37:30 UTC
But the example is not self-explanatory since you do not make it explicit in 
the normative part. At least not to me and probably many other readers either.
Comment 7 Michael Kay 2005-07-22 00:15:50 UTC
I will add the redundant qualifier "(whether significant or insignificant)" for
the benefit of readers who need it spelled out.
Comment 8 Sharon Adler 2005-07-22 16:19:20 UTC
With Michael Kay's final comment I would expect that this now satisfies your 
comment.  I will close it - reopen if you must.