[Home] [By Thread] [By Date] [Recent Entries]
At 2006-03-03 15:53 -0800, Aditya wrote:
My output should look like Your code worked for me (transcript below). But note that it is wrong for a larger data-set and the data-type should be: data-type="number" in order to work properly for larger data sets. But for your data-set, your code works just fine. I hope this helps. . . . . . . . . . Ken
T:\ftemp>type aditya.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"><xsl:output method="text"/> <xsl:template match="/"> <xsl:apply-templates select="/cc/mods"/> </xsl:template> <xsl:template match="/cc/mods">
<xsl:for-each select="mod/usr">
<xsl:sort select="position()" order="descending" data-type="text"/>
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template></xsl:stylesheet> T:\ftemp>xslt aditya.xml aditya.xsl con usr3 usr2 usr1 T:\ftemp> -- Upcoming XSLT/XSL-FO hands-on courses: Washington,DC 2006-03-13/17 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|

Cart



