Forcing blank values to bottom of a sort
I'm a relative newbie to XSLT and am struggling with this problem. I have a sorted result set that begins as follows:
<xsl:for-each select="Player">
<xsl:sort select="GrossScore" data-type="number"/>
When GrossScore is blank, I'd like those result rows to be at the bottom, but otherwise I'd like the numerical values of GrossScore to be in the normal sequence.
It would be great to insert some kind of if statement to test for a blank and replace it with an arbitrarily large number like 999 for the sort operation, but I can't see any syntax that would work. I've also thought about trying to sort on the length>0 of characters in GrossScore first then use a second sort on the numeric value, but again what syntax?
Any ideas on cracking this would be greatly appreciated.
|