## [saxon] Problems with sorting empty greatest/least

 [saxon] Problems with sorting empty greatest/least From: - 2004-03-31 13:25:37 ```I am still running 7.8 and have the following query: let \$list :=3D=20 one three empty two for \$x in \$list/item order by \$x/@nr descending empty greatest return \$x The result is: three two one empty The empty item is at the bottom. If I change the sort spec to 'empty least', the empty item is at the top. Shouldn't it be the other way round ? Am I expecting the wrong thing ? Regards, Juliane. ```

 [saxon] Problems with sorting empty greatest/least From: - 2004-03-31 13:25:37 ```I am still running 7.8 and have the following query: let \$list :=3D=20 one three empty two for \$x in \$list/item order by \$x/@nr descending empty greatest return \$x The result is: three two one empty The empty item is at the bottom. If I change the sort spec to 'empty least', the empty item is at the top. Shouldn't it be the other way round ? Am I expecting the wrong thing ? Regards, Juliane. ```
 RE: [saxon] Problems with sorting empty greatest/least From: Michael Kay - 2004-03-31 14:12:28 ```This particular example seems to work OK in 7.9.1, but if I permute "descending" and "greatest" to "ascending" and "least", other problems appear including a ClassCastException. So I'll have to look into it. Mike=20 > -----Original Message----- > From: saxon-help-admin@...=20 > [mailto:saxon-help-admin@...] On Behalf Of=20 > Juliane.Harbarth@... > Sent: 31 March 2004 13:26 > To: saxon-help@... > Subject: [saxon] Problems with sorting empty greatest/least >=20 >=20 >=20 > I am still running 7.8 and have the following query: >=20 > let \$list :=3D=20 > > one > three > empty > two > > for \$x in \$list/item > order by \$x/@nr descending empty greatest > return \$x >=20 > The result is: > three > two > one > empty >=20 > The empty item is at the bottom. > If I change the sort spec to 'empty least', the > empty item is at the top. >=20 > Shouldn't it be the other way round ? > Am I expecting the wrong thing ? >=20 > Regards, > Juliane. >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > saxon-help mailing list > saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help >=20 ```
 RE: [saxon] Problems with sorting empty greatest/least From: Michael Kay - 2004-03-31 14:59:06 ```Bug now fixed and recorded, see https://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D926727&grou= p_id=3D29 872&atid=3D397617 Thanks, Mike=20 > -----Original Message----- > From: saxon-help-admin@...=20 > [mailto:saxon-help-admin@...] On Behalf Of=20 > Juliane.Harbarth@... > Sent: 31 March 2004 13:26 > To: saxon-help@... > Subject: [saxon] Problems with sorting empty greatest/least >=20 >=20 >=20 > I am still running 7.8 and have the following query: >=20 > let \$list :=3D=20 > > one > three > empty > two > > for \$x in \$list/item > order by \$x/@nr descending empty greatest > return \$x >=20 > The result is: > three > two > one > empty >=20 > The empty item is at the bottom. > If I change the sort spec to 'empty least', the > empty item is at the top. >=20 > Shouldn't it be the other way round ? > Am I expecting the wrong thing ? >=20 > Regards, > Juliane. >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > _______________________________________________ > saxon-help mailing list > saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help >=20 ```