[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:sort in reverse doc order
I have an xml file which has the following representation from which i need to extract user information in reverse documentation order - <cc> <mods> <mod> <usr>usr1</usr> ....... </mod> <mod> <usr>usr2</usr> ....... </mod> <mod> <usr>usr3</usr> ....... </mod> </mods> </cc> My output should look like usr3 usr2 usr1 I used the following snippet of code but it doesnt seem to work as expected= . <xsl:template match=3D"/cc/mods"> <xsl:for-each select=3D"mod/usr"> <xsl:sort select=3D"position()" order=3D"descending" data-type=3D"t= ext"/> <xsl:value-of select=3D"."/> <xsl:text> </xsl:text> </xsl:for-each> </xsl:template> Please let me know what i am doing wrong. Thanks, -- Aditya "Vision is not enough; it must be combined with venture. It is not enough to stare up the steps; we must step up the stairs." - Vaclav Havel
|
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
|