Use sortby()

Hi,

What are the pre-requisites to use a sortby() clause inside an xQuery expression to work correctly?

This is what I like to do :

Data :
------


















What I like is that all documents are returned in descending order of date attribue where the type attribute= ‘4’?

I’ve found the solution myself :

/A sortby(B/C[@type=‘4’]/@date desc)

Thx anyway…

Typing error in previous reply, the correct xquery should be like :

I’ve found the solution myself :

/A sortby(B/C/DATE[@type=‘4’]/@date desc)

Thx anyway…