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

RE: grouping and sorting by date

Subject: RE: grouping and sorting by date
From: Nathan Shaw <n8_shaw@xxxxxxxxx>
Date: Wed, 3 Mar 2004 07:29:20 -0800 (PST)
date sorting xsl
Thanks Jarno. I did not see your earlier reply, sorry.
I figured that I either did not include enough details
or that my post was simply lost in the chop.

One question for you... could this be accomplished
using template matching instead of for-each loops?

Thanks for your help. This should at least get me
started and heading in the right direction!

--Nathan


--- Jarno.Elovirta@xxxxxxxxx wrote:
> Hi,
> 
> > I am trying to group and sort by date in an xslt I
> am
> > working on going from xml to html. Specifically, I
> am
> > trying to sort by year, month and then day on an
> > event's start date. It appears that I may need to
> use
> > keys and a sorting method to do this. I have
> looked
> > through the FAQs and other tutorials, but I am
> having
> > trouble grokking it. Can someone lend some help?
> 
> Didn't I or someone else here already reply to you
> about the sorting? Could you elaborate on exactly
> what do you have problems with? First declare the
> key to be used in the Muechian grouping
> 
>   <xsl:key name="group" match="xcal:vevent"
> use="substring-before(xcal:dtstart, ' ')"/>
> 
> then group and sort with
> 
>   â?¦
>   <!-- process groups -->
>   <xsl:for-each select="xcal:vevent[generate-id(.) =
> generate-id(key('group',
> substring-before(xcal:dtstart, ' ')))]">
>     <xsl:sort
> select="translate(substring-before(xcal:dtstart, '
> '), '-', '')" data-type="number" />
>     <!-- process group members -->
>     <xsl:for-each select="key('group',
> substring-before(xcal:dtstart, ' '))">
>       â?¦
>     </xsl:for-each>
>   </xsl:for-each>
>   â?¦
> 
> Cheers,
> 
> Jarno - Chris C: Vengeance Is Mine
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster
http://search.yahoo.com

 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.