xsl/xhtml5: simplify news @date check

This commit is contained in:
Astro 2014-04-02 18:25:33 +02:00
parent 22ca23d9d3
commit 3ecb7f8780
1 changed files with 6 additions and 5 deletions

View File

@ -135,19 +135,20 @@
<xsl:for-each select="newsfile">
<xsl:sort select="date:seconds(document(concat('../', .))/item/@date)" data-type="number" order="descending" />
<xsl:variable name="news" select="document(concat('../', .))"/>
<xsl:if test="position() &lt;= 10 and
not(starts-with(
starts-with(
date:difference(
document(concat('../', .))/item/@date,
date:date-time()
date:date-time(),
$news/item/@date
),
'-'
))">
)">
<xsl:variable name="newsfile"><xsl:value-of select="."/></xsl:variable>
<xsl:variable name="itemposition" select="position()"/>
<xsl:for-each select="document(concat('../', $newsfile))/item">
<xsl:for-each select="$news/item">
<article><div>
<xsl:if test="event">