This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It's often necessary to choose between sort order and collation used at runtime, especially when implementing a GUI - which typically has toggles for options like these. This is particularly hard to do right now, as the "order by" syntax has these as statically determined properties of the expression. One possible way tp do this currently is: order by if($asc) then $i/title else () ascending, if($asc) then () else $i/title descending It would be beneficial to allow an alternate form of "order by" that allows these properties to be specified at runtime.
Another way of achieving this, which would also have the benefit of adding a sort capability to XPath, would be a higher order sort() function, parameterized by either (a) a function that computes the sort key, or (b) a function that compares two items in the sequence to be sorted
Assigning to future requirements per Working Group decision (https://lists.w3.org/Archives/Member/w3c-xsl-query/2012Oct/0087.html).