[Bug 9276] New: [XQTS] Order of results of fn-doc-33 are not well defined.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9276

           Summary: [XQTS] Order of results of fn-doc-33 are not well
                    defined.
           Product: XML Query Test Suite
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XML Query Test Suite
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: oliver@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


One section of this query is as follows:

for $i in $root//QObject/local:drawDiagram(.)
stable order by string($i)
return $i

The fact that the order by is stable does no good here!

The problem lies with the path expression $root//QObject/local:drawDiagram(.)

Following the rules in [XQuery] 3.2, the nodes returned from the path
expression are sorted into document order and deduplicated.

However, all the nodes in this sequence are newly constructed, and thus have an
implementation defined order.

Whilst it is undesirable for an implementation to return the nodes in an
arbitrary permutation, it is allowed by the spec.  I cannot see how the spec
could be easily changed to allow for this seemingly useful use-case, so I have
marked this as a bug against XQTS.

The simplest solution I can see is to replace the for expression with a for
expression:

for $object in $root//QObject 
for $i in local:drawDiagram($object)
stable order by string($i)
return $i


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 18 March 2010 16:48:24 UTC