W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2015

[Bug 29266] New: Incorrect example for array:sort

From: <bugzilla@jessica.w3.org>
Date: Fri, 06 Nov 2015 13:11:38 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29266-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29266

            Bug ID: 29266
           Summary: Incorrect example for array:sort
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: mike@saxonica.com
          Reporter: adam@exist-db.org
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

I think the second example given for array:sort in XPath F+O 3.1 may be
incorrect in both the latest public and latest internal drafts.

The example given in the spec is:

The expression array:sort([1, -2, 5, 10, -10, 10, 8], fn:abs#1) returns (1, -2,
5, 8, 10, -10).


However, if I am not mistaken then the return value should actually be:

[1, -2, 5, 8, 10, -10, 10]


That is to say that (1) the example is missing a value in the return array, and
(2) that in the example the result is shown as a sequence however it should be
an array.

Cheers Adam.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 6 November 2015 13:11:41 UTC

This archive was generated by hypermail 2.3.1 : Friday, 6 November 2015 13:11:41 UTC