Dear Christian and BaseX friends,
I hope this email finds you well! I had a question about function signatures:
it would seem that there's a typo/issue with the signature (and final example) for array:sort[1,2]. Shouldn't the signature for array:sort read:
array:sort(
$array as array(*),
$collation as xs:string? := fn:default-collation(),
$key as fn(item()*) as xs:anyAtomicType* := fn:data#1
) as item()*
(cribbed from the
qt4cg.org specs[3])? Unless I'm misreading the signature... in which case, excuse me!
Additionally, the current signature for array:sort seems to be in approximate alignment with array:sort-by, which is missing from our lovely BaseX docs' array page. To further my confusion, it looks like the examples from the
qt4cg.org array:sort-by[4] signature work generally in my BaseX 12.0. Could that be added, or is the function still waiting in the BaseX wings? :)
Best wishes,
Bridger
[2] the example `array:sort( [ 1, 2, 3 ], keys := fn($n) { -$n })` throws an error in BaseX 12.0:
[XPST0017] array:sort(array[,collation,key]): Unknown keyword: keys.