noted idea on comparing current and date of the news posted

This commit is contained in:
vv01f 2014-03-28 21:28:12 +01:00
parent 0e32e49904
commit 9d9a63871d
1 changed files with 16 additions and 8 deletions

View File

@ -85,15 +85,23 @@
</xsl:template>
<xsl:template match="item" mode="news">
<xsl:param name="link"/>
<xsl:param name="link"/>
<item date="{@date}" class="news">
<header>News</header>
<footer>by <xsl:value-of select="@author"/></footer>
<content-text><xsl:value-of select="@title"/></content-text>
<xsl:apply-templates select=".//image[1]" mode="news"/>
<link><xsl:value-of select="$link"/></link>
</item>
<!-- date cannot be compared (to current date) in xslt 1.0 without a param handed over -->
<!-- current-date() as of XSLT 2.0 -->
<!--
<xsl:if test="{@date}">
-->
<item date="{@date}" class="news">
<header>News</header>
<footer>by <xsl:value-of select="@author"/></footer>
<content-text><xsl:value-of select="@title"/></content-text>
<xsl:apply-templates select=".//image[1]" mode="news"/>
<link><xsl:value-of select="$link"/></link>
</item>
<!--
</xsl:if>
-->
</xsl:template>
<xsl:template match="item/image[1]" mode="news">