ATOM- und RSS-Items auf 10 begrenzt
git-svn-id: svn://svn.c3d2.de/c3d2-web/trunk@492 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
parent
ed647e8d4c
commit
72f67ebbbb
17
xsl/atom.xsl
17
xsl/atom.xsl
|
@ -30,13 +30,16 @@
|
|||
|
||||
<xsl:for-each select="newsfile">
|
||||
<xsl:sort select="date:seconds(document(.)/@date)" data-type="number" order="descending" />
|
||||
<xsl:variable name="newsfile" select="."/>
|
||||
|
||||
<xsl:for-each select="document(.)/item">
|
||||
<xsl:call-template name="atom-entry">
|
||||
<xsl:with-param name="newsfile" select="$newsfile"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="position() <= 10">
|
||||
<xsl:variable name="newsfile" select="."/>
|
||||
|
||||
<xsl:for-each select="document(.)/item">
|
||||
<xsl:call-template name="atom-entry">
|
||||
<xsl:with-param name="newsfile" select="$newsfile"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
|
|
@ -24,10 +24,13 @@
|
|||
<!-- TODO: Insert "now": <pubDate><xsl:value-of select="news/item/@date"/></pubDate> -->
|
||||
<xsl:for-each select="newsfile">
|
||||
<xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" />
|
||||
<xsl:if test="position() <= 10">
|
||||
|
||||
<xsl:apply-templates select="document(.)/item">
|
||||
<xsl:with-param name="newsfile" select="."/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="document(.)/item">
|
||||
<xsl:with-param name="newsfile" select="."/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</channel>
|
||||
|
||||
|
|
Loading…
Reference in New Issue