array:sort
Returns an array containing all the members of the supplied array, sorted according to the value of a sort key supplied as a function, using the supplied collation.
sort($array as array(*)) ➔ array(*)
Arguments | |||
| $array | array(*) | The input array |
Result | array(*) |
sort($array as array(*), $collation as xs:string?) ➔ array(*)
Arguments | |||
| $array | array(*) | The input array |
| $collation | xs:string? | The collation |
Result | array(*) |
sort($array as array(*), $collation as xs:string?, $key as function(item()*) as xs:anyAtomicType*) ➔ array(*)
Arguments | |||
| $array | array(*) | The input array |
| $collation | xs:string? | The collation |
| $key | function(item()*) as xs:anyAtomicType* | The sort key |
Result | array(*) |
Namespace
http://www.w3.org/2005/xpath-functions/array
Links to W3C specifications
XPath 3.1 Functions and Operators
Notes on the Saxon implementation
Available since Saxon 9.7. Signature changed to add $collation
argument from
9.7.0.8.