60 rader
1.7 KiB
XML
60 rader
1.7 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
|
|
<xsl:import href="../tools/xsltsl/translations.xsl" />
|
|
<xsl:import href="../tools/xsltsl/static-elements.xsl" />
|
|
|
|
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"/>
|
|
|
|
<xsl:template match="/">
|
|
<xsl:copy>
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
</xsl:copy>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="/html/body">
|
|
<body>
|
|
<xsl:apply-templates />
|
|
|
|
<!-- $today = current date (given as <html date="...">) -->
|
|
<xsl:variable name="today">
|
|
<xsl:value-of select="/html/@date" />
|
|
</xsl:variable>
|
|
|
|
<xsl:for-each select="/html/set/news[translate(@date,'-','') <= translate($today,'-','')]">
|
|
<xsl:sort select="@date" order="descending"/>
|
|
<p>
|
|
<b><xsl:value-of select="@date" /></b><br/>
|
|
<xsl:value-of select="body"/>
|
|
<xsl:variable name="link"><xsl:value-of select="link"/></xsl:variable>
|
|
<xsl:if test="$link!=''">
|
|
[<a href="{link}"><xsl:value-of select="/html/text[@id='more']"/>]</a>
|
|
</xsl:if>
|
|
</p>
|
|
</xsl:for-each>
|
|
</body>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="@*|node()" priority="-1">
|
|
<xsl:copy>
|
|
<xsl:apply-templates select="@*|node()"/>
|
|
</xsl:copy>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="set | tags"/>
|
|
|
|
<!--translated sentence "receive-newsletter"-->
|
|
<xsl:template match="receive-newsletter">
|
|
<xsl:call-template name="gettext">
|
|
<xsl:with-param name="id" select="'receive-newsletter'" />
|
|
</xsl:call-template>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="subscribe-nl">
|
|
<xsl:call-template name="subscribe-nl" />
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|
|
|