Sort by a value that's a comma seperated list
Ok here's my problem.
I am using xsl to style a result set. Some values are text, some are numbers and one is a comma seperated list. Some values might have numerous list items "8,6,4,2" others may be just one list item "2". The list is always the highest values first. What I want to do is sort (numeric) this list by the first (or only) value in the list.
The item that contains the list is called "validSplit"
If I use: <xsl:sort select="substring-before(validSplit,',')" order="descending" data-type="number"/>
It works providing the list has more than 1 item. However when the list has only 1 item, there is obviously no comma, therefore the value is blank.
If anyone could steer me in the right direction, please let me know.