xsl/portal2items: fix news @date check again

This commit is contained in:
Astro 2014-04-02 00:46:58 +02:00
parent 598ca32f2f
commit d646fb0eda
2 changed files with 6 additions and 4 deletions

View File

@ -18,8 +18,9 @@
<!-- Events aus den News ziehen -->
<xsl:for-each select="document('../news.xml')/page/news/newsfile">
<xsl:if test="starts-with(date:difference(date:date-time(), document(concat('../', .))/item/@date), '-')">
<xsl:apply-templates select="document(concat('../', .))/item/event">
<xsl:variable name="news" select="document(concat('../', .))"/>
<xsl:if test="starts-with(date:difference(date:date-time(), $news/item/@date), '-')">
<xsl:apply-templates select="$news/item/event">
<xsl:with-param name="link" select="concat(substring-before(substring-after(., 'content/'), '.xml'), '.html')"/>
</xsl:apply-templates>
</xsl:if>

View File

@ -18,8 +18,9 @@
<!-- Extract from news -->
<xsl:for-each select="document('../news.xml')//newsfile">
<xsl:if test="starts-with(date:difference(date:date-time(), @date), '-')">
<xsl:apply-templates select="document(concat('../', .))/item"
<xsl:variable name="news" select="document(concat('../', .))"/>
<xsl:if test="starts-with(date:difference(date:date-time(), $news/item/@date), '-')">
<xsl:apply-templates select="$news/item"
mode="news">
<xsl:with-param name="link"
select="concat(substring-before(substring-after(., 'content/'), '.xml'), '.html')"/>