sorting nodes by date in XSL

A

andy

I have a series of xml nodes like the following...

<MatchedItem>
<DateMatched>2008-03-23T03:15:33.84375+00:00</DateMatched>
<Url>http://www.mininova.org/get/1264031</Url>
<PatternMatched>
<PatternString>daily.show</PatternString>
<MatchOnce>false</MatchOnce>
</PatternMatched>
<Title>Jon Stewart &amp; Daily Show - America - A Citizen's Guide
to Democracy Inaction [MakeGreatMusic.Net (5S/0L)</Title>
<FeedName>Mininova</FeedName>
<Size>78.022</Size>
</MatchedItem>


I would like to group nodes by the date, specifically I would like all
the nodes that have the day to be together in a html table when you view
the xml file in browser.

Could someone give me some pointers as to how to achieve this ?.

Any help appreciated.
 
M

Martin Honnen

andy said:
I would like to group nodes by the date, specifically I would like all
the nodes that have the day to be together in a html table when you view
the xml file in browser.

Could someone give me some pointers as to how to achieve this ?.

If you use XSLT 2.0 (e.g. with Saxon or Gestalt or AltovaXML) then you
have support for xs:date and xs:dateTime data types and you have
xsl:for-each-group to group.

With XSLT 1.0 you need to use Muenchian grouping:
<URL:http://www.jenitennison.com/xslt/grouping/index.xml>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,251
Members
46,850
Latest member
Brightrs

Latest Threads

Top