<?xml version="1.0" encoding="koi8-u"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:func="http://www.exslt.org/functions"
xmlns:my="http://gingerall.org/sablot/myfunc"
extension-element-prefixes="func"
exclude-result-prefixes="my"
>
<xsl:output method="html" encoding="koi8-u"/>
<func:script implements-prefix="my" language="javascript">
<![CDATA[
function getTimestamp(nodeset)
{
node = nodeset[0].childNodes;
d = new Date(node[0].nodeValue);
return d.getTime();
}
]]>
<xsl:fallback>
<xsl:text>NaN</xsl:text>
</xsl:fallback>
</func:script>
<xsl:variable name="title" select="rss/channel/title" />
<xsl:variable name="lastBuildDate" select="rss/channel/lastBuildDate" />
<xsl:variable name="link" select="rss/channel/link" />
<xsl:template match="/">
<html>
<body>
<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$link" /></xsl:attribute><xsl:value-of select="$title"
<hr />
<xsl:for-each select="rss/channel/item">
<xsl:sort select="my:getTimestamp(pubDate)" order="descending"/>
<b><xsl:value-of select="title" /></b><br />
<xsl:value-of select="description" /><br />
<i><xsl:value-of select="my:getDate(pubDate)" /><xsl:text>, </xsl:text><a target="_blank"><xsl:attribute name="href"><x
<hr />
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>