[xsl] Sorting seems not to work completely

Subject: [xsl] Sorting seems not to work completely
From: "Mark" <mark@xxxxxxxxxxxx>
Date: Wed, 27 Jul 2011 10:29:06 -0700
I cannot get the @value to sort in descending order. My XML (simplified) and template are below. The sorts on the Date attributes work, but the one on the value attribute does not. Please, what am I doing wrong?

<Stamp scott-number="2888" pofis-number="12" value="1" type="definitive">
<Date year="1993" month="7" day="1"></Date>
<Inscription czech="Ceski Budejovice" eng="Ceske Budejovice"></Inscription>

<xsl:template match="List">
<xsl:element name="List">
<xsl:for-each-group select="Item/Stamp" group-by="concat(Date/@year, ' ', Date/@month, ' ', Date/@day)">
<xsl:sort select="Date/@year" data-type="number"></xsl:sort>
<xsl:sort select="Date/@month" data-type="number"></xsl:sort>
<xsl:sort select="Date/@day" data-type="number"></xsl:sort>
<xsl:sort select="@value" order="descending" data-type="number"></xsl:sort>
<xsl:element name="Item">
<xsl:copy-of select="current()/Date" copy-namespaces="no"></xsl:copy-of>
<xsl:copy-of select="current-group()" copy-namespaces="no"></xsl:copy-of>

Current Thread