order by does not use numeric comparisons when it should
Status: Alpha
Brought to you by:
howardk
If you add enough <author>s to one of the <book>s in
bib.xml to make more than 9 and run the sample app and
then issue this query:
<tag>
{
for $f in /bib/book
order by count($f/author)
return
<count>
{count($f/author)}
</count>
}
</tag>
You get something like:
<tag><count>0</count>
<count>1</count>
<count>1</count>
<count>12</count>
<count>3</count>
</tag>
I would expect to see:
<tag><count>0</count>
<count>1</count>
<count>1</count>
<count>3</count>
<count>12</count>
</tag>
Since count() is a numeric function, XQEngine should
know to sort numerically.