podcast: limit to 23 items per feed

This commit is contained in:
Astro 2011-11-14 02:15:26 +01:00
parent dae0cfd707
commit 02ce095486
1 changed files with 30 additions and 28 deletions

View File

@ -96,34 +96,36 @@
<xsl:for-each select="newsfile"> <xsl:for-each select="newsfile">
<xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" /> <xsl:sort select="date:seconds(document(.)/item/@date)" data-type="number" order="descending" />
<xsl:choose> <xsl:if test="position() &lt;= 23">
<xsl:when test="($selection = 'pentaradio' or $selection = 'pentamedia') and <xsl:choose>
starts-with(., 'content/news/pentaradio') and <xsl:when test="($selection = 'pentaradio' or $selection = 'pentamedia') and
count(document(.)/item//resource) &gt; 0"> starts-with(., 'content/news/pentaradio') and
<xsl:apply-templates select="document(.)/item//resource" mode="preselect"> count(document(.)/item//resource) &gt; 0">
<xsl:with-param name="newsfile" select="."/> <xsl:apply-templates select="document(.)/item//resource" mode="preselect">
</xsl:apply-templates> <xsl:with-param name="newsfile" select="."/>
</xsl:when> </xsl:apply-templates>
<xsl:when test="($selection = 'pentacast' or $selection = 'pentamedia') and </xsl:when>
starts-with(., 'content/news/pentacast') and <xsl:when test="($selection = 'pentacast' or $selection = 'pentamedia') and
count(document(.)/item//resource) &gt; 0"> starts-with(., 'content/news/pentacast') and
<xsl:apply-templates select="document(.)/item//resource" mode="preselect"> count(document(.)/item//resource) &gt; 0">
<xsl:with-param name="newsfile" select="."/> <xsl:apply-templates select="document(.)/item//resource" mode="preselect">
</xsl:apply-templates> <xsl:with-param name="newsfile" select="."/>
</xsl:when> </xsl:apply-templates>
<xsl:when test="($selection = 'pentamusic' or $selection = 'pentamedia') and </xsl:when>
starts-with(., 'content/news/pentamusic') and <xsl:when test="($selection = 'pentamusic' or $selection = 'pentamedia') and
count(document(.)/item//resource) &gt; 0"> starts-with(., 'content/news/pentamusic') and
<xsl:apply-templates select="document(.)/item//resource" mode="preselect"> count(document(.)/item//resource) &gt; 0">
<xsl:with-param name="newsfile" select="."/> <xsl:apply-templates select="document(.)/item//resource" mode="preselect">
</xsl:apply-templates> <xsl:with-param name="newsfile" select="."/>
</xsl:when> </xsl:apply-templates>
<xsl:when test="$selection = '' and count(document(.)/item//resource) &gt; 0"> </xsl:when>
<xsl:apply-templates select="document(.)/item//resource" mode="preselect"> <xsl:when test="$selection = '' and count(document(.)/item//resource) &gt; 0">
<xsl:with-param name="newsfile" select="."/> <xsl:apply-templates select="document(.)/item//resource" mode="preselect">
</xsl:apply-templates> <xsl:with-param name="newsfile" select="."/>
</xsl:when> </xsl:apply-templates>
</xsl:choose> </xsl:when>
</xsl:choose>
</xsl:if>
</xsl:for-each> </xsl:for-each>
</channel> </channel>