- From: Mukul Gandhi <gandhi.mukul@gmail.com>
- Date: Sat, 16 Jan 2021 09:50:53 +0530
- To: Christian Grün <cg@basex.org>
- Cc: public-xslt-40@w3.org
Received on Saturday, 16 January 2021 04:21:22 UTC
On Fri, Jan 15, 2021 at 12:01 PM Christian Grün <cg@basex.org> wrote:
> If the input is numeric, the function argument can be used for that:
>
> sort($data, (), function($key) { -$key })
>
I think, you imply the intent, and I agree.
For correctness sake, I guess you meant,
sort($data, (), function($key) { 0 - $key })
> In others, you can use a subsequent fn:reverse call:
>
> reverse(sort($data))
>
Wouldn't this be inefficient, as compared to having a native "descending"
argument to the fn:sort function? Yes, but for now, reverse(sort($data))
would work for us.
--
Regards,
Mukul Gandhi
Received on Saturday, 16 January 2021 04:21:22 UTC