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 3344 - distinct-duration-equal-1 treats xs:yearMonthDuration('P0Y') and xs:dayTimeDuration('P0D') as different
Summary: distinct-duration-equal-1 treats xs:yearMonthDuration('P0Y') and xs:dayTimeDu...
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.9.4
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-16 15:09 UTC by Alberto Massari
Modified: 2006-06-21 19:15 UTC (History)
0 users

See Also:


Attachments

Description Alberto Massari 2006-06-16 15:09:08 UTC
distinct-duration-equal-1 expects that 

  fn:distinct-values((xs:yearMonthDuration('P0Y'), xs:dayTimeDuration('P0D')))

returns "P0M PT0S", as if they were different values.
But now that all durations are compared using op:duration-equal, and that the spec says "with the exception of the zero-length duration, no instance of xs:dayTimeDuration can ever be equal to an instance of xs:yearMonthDuration", they should be considered equal, and the query should expect one of two possible results 'P0M' and 'PT0S'
Comment 1 Carmelo Montanez 2006-06-20 18:14:20 UTC
Alberto:

Thanks for the message.  I sort of agree with you after reading the specs.
Will change the expected results to "P0M" and "PT0S".

Thanks,
Carmelo
Comment 2 Michael Kay 2006-06-21 07:58:55 UTC
I agree (regardless what Saxon says!) these two durations are equal, and only one of them should be returned; the spec says that it is implementation-defined which of the two durations is returned.
Comment 3 Carmelo Montanez 2006-06-21 13:14:27 UTC
Alberto:

Thanks.  Updated the catalog file to reflect two possible outcomes for this test.

Thanks,
Carmelo