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

Sorting unsorted elements based on their attributes

Subject: Sorting unsorted elements based on their attributes
From: "thei" <thei@xxxxxxxxx>
Date: Thu, 5 Jun 2003 02:31:06 +1000
attributes sort
Hello,

I have an xml file as thus:

<comments>
<comment page="20030101">blah</comment>
<comment page="20030207">blah</comment>
<comment page="20011127">blah</comment>
...etc
</comments>

Each <comment> element has a page attribute, which contains a date in
format CCYYMMDD as shown above.

I'm trying to use a XSL stylesheet to display these, or sort them if you
prefer that wording, into a year/month/day type format. In other words,
if there's say 12 comments for 2003-06-05, then I want to display all 12
in a list under the heading 2003-06-05, then there may be another 4
comments for 2003-06-04, which I want to display under their heading,
etc. I can do the displaying and all easily enough, but I'm having
trouble sorting the results into days and months.

I hope that made some sense, and I hope someone can show me an easy way
to do this.

Thanks,

Printed on 100% recycled electrons.
http://nedmartin.org/




 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.