Order by clause does not seem to be working. Do I have the correct xquery query?
for $record in doc('XQuery.xml')/dataroot/RecentIndices_solarFlux
where $record/Month = 1 or
$record/Month = 2
order by $record/Geomagnetic_Smoothed_Ap
return $record
The output I’m getting is something like this:
-1, 10.5, 11.6, 5, 8.7
I am using Stylus Studio X14 Release 2 XML Enterprise Suite.
I found out the problem was because I was using decimal numbers, so I surrounded the path in order by with xs:decimal( exp. ).