Do you get any errors from the above code? I'm not sure the expressions you're using in the select statement are correct/allowed in xsl:sort. But yes, you can have as many sort's as you would like. If it can not sort against the first xsl:sort it moves on the next etc.
Hmmm...ah ok...I see...but if the stuff that is shown is random..does it matter that it is sorted by date then? Does'nt that undermine the meaning of "random"? :-)
I see what you mean but I don't know how it can be done. Maybe some other bright mind in here has the answer.
xslt sorting: Is it possible to write to nested sorting?
Is it possible to write to nested sorting?
That is:
<xsl:for-each select="$spotNodeSet">
<xsl:sort select="rdm:Random(5)" order="descending" />
<xsl:sort select="(./newsDate [string(current()/newsDate)!=''] | ./@updateDate [string(current()/newsDate)=''])" order="descending" />
Hi Biagio
Do you get any errors from the above code? I'm not sure the expressions you're using in the select statement are correct/allowed in xsl:sort. But yes, you can have as many sort's as you would like. If it can not sort against the first xsl:sort it moves on the next etc.
/Jan
Hi,
I've not error, but is it possibile to order first on first sort then the result order by second sort?
Ehm so you want to make two different sorts on the same xml?
/Jan
Yes... I wish to pick up 5 random nodes. Then I wish sort them by date and time.
Hi Biagio
Hmmm...ah ok...I see...but if the stuff that is shown is random..does it matter that it is sorted by date then? Does'nt that undermine the meaning of "random"? :-)
I see what you mean but I don't know how it can be done. Maybe some other bright mind in here has the answer.
/Jan
is working on a reply...