xsl/xhtml5: fix news @date check again

This commit is contained in:
Astro 2014-04-02 18:08:51 +02:00
parent ee5c98a0f4
commit 22ca23d9d3
1 changed files with 4 additions and 3 deletions

View File

@ -257,16 +257,17 @@
<xsl:for-each select="document('../news.xml')/page/news/newsfile">
<xsl:sort select="date:seconds(document(concat('../', .))/item/@date)" data-type="number" order="descending" />
<xsl:variable name="newsfile" select="."/>
<xsl:variable name="news" select="document(concat('../', $newsfile))"/>
<xsl:for-each select="document(concat('../', $newsfile))/item">
<xsl:for-each select="$news/item">
<xsl:if test="((string-length($prefix) = 0) or
starts-with($newsfile, concat('content/news/', $prefix))) and
(($details != 'resources-only') or
(count(resource) &gt; 0)) and
starts-with(
date:difference(
document(concat('../', .))/item/@date,
date:date-time()
date:date-time(),
$news/item/@date
),
'-'
)">