<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>littleforest &#187; xsl:sort</title>
	<atom:link href="http://www.littleforest.co.uk/tag/xslsort/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.littleforest.co.uk</link>
	<description>The littleforest Weblog</description>
	<lastBuildDate>Fri, 05 Nov 2010 08:01:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>XSL:Sort By Date</title>
		<link>http://www.littleforest.co.uk/articles/xsl-basic-sort-by-date/</link>
		<comments>http://www.littleforest.co.uk/articles/xsl-basic-sort-by-date/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 11:06:03 +0000</pubDate>
		<dc:creator>Michael Thomas</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[LiveSite]]></category>
		<category><![CDATA[XSL]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[xsl:sort]]></category>

		<guid isPermaLink="false">http://www.littleforest.co.uk/?p=184</guid>
		<description><![CDATA[The following  should do the work

&#60;xsl:apply-templates select=&#34;[some repeating datum]&#34;&#62;
&#60;xsl:sort order=&#34;descending&#34; select=&#34;substring(//somedate,7,4)&#34;&#62; &#60;!-- year--&#62;
&#60;xsl:sort order=&#34;descending&#34; select=&#34;substring(//somedate,4,2)&#34;&#62; &#60;!-- month--&#62;
&#60;xsl:sort order=&#34;descending&#34; select=&#34;substring(//somedate,1,2)&#34;&#62; &#60;!-- day--&#62;
&#60;/xsl:apply-templates&#62;

This assumes the date is in the form dd/mm/yyyy: the seperators could be different as they are ignored anyway based on the substring.
The important thing to realise here is that the &#60;xsl:sort&#62; functions do not [...]]]></description>
		<wfw:commentRss>http://www.littleforest.co.uk/articles/xsl-basic-sort-by-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

