开发者

Saxon descending order

开发者 https://www.devze.com 2023-03-31 18:37 出处:网络
To get elements in ascending order with saxon we write this... saxon:sort(sale, saxon:expression(\'@price * @qty\'))

To get elements in ascending order with saxon we write this...

saxon:sort(sale, saxon:expression('@price * @qty'))

How to get 开发者_运维知识库the elements in descending order?

Thank you in advance.

Décio Maigret Macamo.


Why not

saxon:sort(sale, -saxon:expression('@price * @qty'))

Or perhaps

reverse(saxon:sort(sale, saxon:expression('@price * @qty')))

Or for more flexibility you might try moving from XPath to XQuery (depending on your environment and constraints).

0

精彩评论

暂无评论...
验证码 换一张
取 消