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 3134 - fn-max-2 and fn-min-2 have wrong serialization for double number
Summary: fn-max-2 and fn-min-2 have wrong serialization for double number
Status: VERIFIED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.9.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-21 10:36 UTC by Alberto Massari
Modified: 2006-06-16 10:16 UTC (History)
0 users

See Also:


Attachments

Description Alberto Massari 2006-04-21 10:36:20 UTC
Both queries expect that a double value of "5" gets serialized as 5E0, but the correct serialization for values less than 1E6 is "5".
Either change the query to use "instance of xs:double" or change the values to be bigger than 1E6.
Comment 1 Carmelo Montanez 2006-04-24 14:37:49 UTC
Alberto:

Correct.  I changed the queries to:

fn:max((xs:integer(5000000000),xs:double(3e0)))
fn:min((xs:integer(5),xs:double(3e8)))

Please close the bug if in agreement.

Thanks,
Carmelo
Comment 2 Alberto Massari 2006-06-14 18:31:59 UTC
fn-min-2 is still wrong; it expects 5E0 while the result (a double of value 5) must be serialized as 5. A correct query would be

fn:min((xs:integer(5000000),xs:double(3e8)))

that return 5E6
Comment 3 Carmelo Montanez 2006-06-14 18:53:15 UTC
Alberto:

Correct.  This was a bit of an oversight.  Changed query.  This change is public and you can confirm.  Close the bug if in agreement.

Thanks,
Carmelo
Comment 4 Alberto Massari 2006-06-15 10:17:33 UTC
Carmelo,
also the expected result should be changed from 5E0 to 5E6
Comment 5 Carmelo Montanez 2006-06-15 13:00:52 UTC
Alberto:
Correct.  Will this one ever go away? Value changed.

Carmelo
Comment 6 Alberto Massari 2006-06-15 14:41:54 UTC
Carmelo,
I made a mistake in suggesting 5E6 as the right value; the correct serialization format for a double is 5.0E6
Can you update the result?

Thanks,
Alberto
Comment 7 Carmelo Montanez 2006-06-15 18:31:00 UTC
Alberto:

Not a problem.  I should had catch that though.  taken care of it already.

Carmelo