[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSL Decending Order Query

Subject: XSL Decending Order Query
From: Amrit Gill <gillism@xxxxxxxxxxxx>
Date: Sun, 03 Nov 2002 12:29:17 +0000
decending
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.