Re: [xsl] sorting based on variable and limit the results

Subject: Re: [xsl] sorting based on variable and limit the results
From: Michael Ludwig <milu71@xxxxxx>
Date: Wed, 25 Mar 2009 22:02:10 +0100
David Carlisle schrieb am 25.03.2009 um 15:10:38 (+0000):
> 
> > For counts exceeding 9, make sure the value is treated as a number:
> > 
> >    <xsl:sort select="count(key('p',n))" data-type="number"/>
> 
> ah yes, for xslt 1 that's true (xslt 2 knows that count() returns
> numbers)

Oh yes, how convenient, I didn't know that. On page 458 of his XSLT and
XPath 2.0 reference (2008), Michael Kay writes that in 2.0, @data-type
is only there for backward compatibility with 1.0, sorting being already
sensitive to the types of the items being sorted (p.456).

Michael Ludwig

Current Thread