[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xsl:perform-sort (in 2.0)
> I just noticed this new instruction (although it was in the last draft > as well) > > Is there any difference bewteen > > <xsl:perform-sort select="$in"> > <xsl:sort select="."/> > </xsl:perform-sort> > > and > > <xsl:for-each select="$in"> > <xsl:sort select="."/> > <xsl:copy-of select="."/> > </xsl:for-each> > > either from a definitional or efficiency point of view? > It's actually been there quite a while, and I think it's proving to be perhaps the least-used new feature in the spec. It was put in as a replacement for a sort() function which took a global sort specification as an argument - rather like xsl:key and key() - but it doesn't seem to be doing a very useful job. Actually the equivalence is to: <xsl:for-each select="$in"> <xsl:sort select="."/> <xsl:sequence select="."/> </xsl:for-each> since no copying is involved. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|