News jetzt in richtiger Reihenfolge. (Danke an Anna)

git-svn-id: svn://svn.c3d2.de/c3d2-web/branches/toidinamais_coole_scheisse@86 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
toidinamai 2006-01-02 19:29:12 +00:00
parent 6f8c5c8a60
commit 19bd33c4b2
1 changed files with 26 additions and 27 deletions

View File

@ -3,6 +3,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:date="http://exslt.org/dates-and-times"
exclude-result-prefixes="xsl rss rdf">
<xsl:include href="date.xsl" />
@ -196,34 +197,32 @@
</xsl:element>
</xsl:template>
<xsl:template match="item">
<h3 class="news"><xsl:value-of select="@title"/></h3>
<small class="news_author">
<xsl:value-of select="@author"/>
</small>
<xsl:variable name="datestring">
<xsl:call-template name="get-datestring">
<xsl:with-param name="date" select="@date" />
</xsl:call-template>
</xsl:variable>
<xsl:element name="small">
<xsl:attribute name="class">news_date</xsl:attribute>
<xsl:value-of select="concat(' @ ', $datestring)"/>
</xsl:element>
<div class="news">
<xsl:apply-templates/>
</div>
<hr class="news"/>
</xsl:template>
<xsl:template match="news">
<xsl:for-each select="newsfile">
<xsl:apply-templates select="document(current())/item" />
<xsl:for-each select="document(newsfile)/item">
<xsl:sort select="date:seconds(@date)" data-type="number" order="descending" />
<h3 class="news"><xsl:value-of select="@title"/></h3>
<small class="news_author">
<xsl:value-of select="@author"/>
</small>
<xsl:variable name="datestring">
<xsl:call-template name="get-datestring">
<xsl:with-param name="date" select="@date" />
</xsl:call-template>
</xsl:variable>
<xsl:element name="small">
<xsl:attribute name="class">news_date</xsl:attribute>
<xsl:value-of select="concat(' @ ', $datestring)"/>
</xsl:element>
<div class="news">
<xsl:apply-templates/>
</div>
<hr class="news"/>
</xsl:for-each>
</xsl:template>