xsl: hack for publishing at the right time

will publish an hour earlier in winter
This commit is contained in:
Astro 2014-04-04 21:16:54 +02:00
parent 71482331c6
commit e7f4ad7e16
5 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,7 @@
<xsl:variable name="newsfile" select="."/>
<xsl:if test="(position() &lt;= $maxitems) and
starts-with(substring-after(substring-after($newsfile, '/'), '/'), $prefix) and
starts-with(date:difference(date:date-time(), document(.)/item/@date), '-')">
starts-with(date:difference(date:date-time(), concat(document(.)/item/@date, '+02:00')), '-')">
<xsl:for-each select="document($newsfile)/item">
<xsl:call-template name="atom-entry">
<xsl:with-param name="newsfile" select="$newsfile"/>

View File

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

View File

@ -19,7 +19,7 @@
<!-- Extract from news -->
<xsl:for-each select="document('../news.xml')//newsfile">
<xsl:variable name="news" select="document(concat('../', .))"/>
<xsl:if test="starts-with(date:difference(date:date-time(), $news/item/@date), '-')">
<xsl:if test="starts-with(date:difference(date:date-time(), concat($news/item/@date, '+02:00')), '-')">
<xsl:apply-templates select="$news/item"
mode="news">
<xsl:with-param name="link"

View File

@ -40,7 +40,7 @@
<xsl:variable name="newsfile" select="."/>
<xsl:if test="(position() &lt;= $maxitems) and
starts-with(substring-after(substring-after($newsfile, '/'), '/'), $prefix) and
starts-with(date:difference(date:date-time(), document(.)/item/@date), '-')">
starts-with(date:difference(date:date-time(), concat(document(.)/item/@date, '+02:00')), '-')">
<xsl:apply-templates select="document(.)/item">
<xsl:with-param name="newsfile" select="$newsfile"/>
</xsl:apply-templates>

View File

@ -140,7 +140,7 @@
starts-with(
date:difference(
date:date-time(),
$news/item/@date
concat($news/item/@date, '+02:00')
),
'-'
)">
@ -268,7 +268,7 @@
starts-with(
date:difference(
date:date-time(),
$news/item/@date
concat($news/item/@date, '+02:00')
),
'-'
)">