|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL Decending Order Query
My query is that of a basic one, but with trying to many times, i have
failed in getting my xml data churned out in descending order, rather than
ascending, which is the de facto standard.
My XML structure is as follows: <archive>
<news>
<date> </date>
<article> </article>
<author> </author>
</news>
</archive>The XSL i use as follows: <?xml version='1.0'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <xsl:for-each select="archive/news"> <xsl:sort select="archive/news" order="descending"> <table width="100%" border="0"> <tr> <td class="yell" align="left"><xsl:value-of select="date"/></td> <tr> <td align="center"><xsl:value-of select="article"/></td> </tr> <tr><td class="yell" align="right"><xsl:value-of select="author"/></td></tr> </tr> <tr /> <tr /> <tr /> <tr /> <tr /> <tr /> <tr /> </table> </xsl:sort> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> It simply doesnt work, i have tried changing the nodes, and also have tried changing where to put the sort, i understand it has to be within the for-each. if anyone can provide a solution to this problem, much appreciated thanks in advance Gill. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








