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 6994 - distinct-duration-equal-2 presumes a certain order
Summary: distinct-duration-equal-2 presumes a certain order
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.2
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-03 13:54 UTC by Bogdan Butnaru
Modified: 2009-10-14 12:37 UTC (History)
0 users

See Also:


Attachments

Description Bogdan Butnaru 2009-06-03 13:54:00 UTC
Hello! 

Test distinct-duration-equal-2 runs the query 
“fn:distinct-values((xs:yearMonthDuration('P1Y'), xs:dayTimeDuration('P365D')))” and expects the result “<doc>P1Y P365D</doc>”. 

However, http://www.w3.org/TR/2007/REC-xpath-functions-20070123/#func-distinct-values says that “[t]he order in which the sequence of values is returned is ·implementation dependent·.” 

Unless I'm missing something, this means that “<doc>P365D P1Y</doc>” is also a valid result, and should be added to the expected results list.

Similar considerations apply to K-SeqDistinctValuesFunc-6, which expects that 
  “deep-equal(
	distinct-values(
		("1", 1, 2, 1, 1, 3, 1, 1, 3, 
		 xs:anyURI("example.com/"), xs:anyURI("example.com/")
		)
	), ("1", 1, 2, 3, xs:anyURI("example.com/"))
   )” should return true, even though distinct-values may reorder elements.

Also, I think ns-queries-results-q1 also has this problem, but I'm not that far in implementation to be sure.
Comment 1 Andrew Eisenberg 2009-06-03 21:29:36 UTC
I agree with the issue that you have raised, and have added the additional expected result that you suggested for distinct-duration-equal-2.

Frans, I believe that K-SeqDistinctValuesFunc-6 should be changed as well.

Comment 2 Frans Englich 2009-10-14 12:37:50 UTC
Fixed in CVS.