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).
精彩评论