aboutsummaryrefslogtreecommitdiff
path: root/xsl/news.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'xsl/news.xsl')
-rw-r--r--xsl/news.xsl38
1 files changed, 38 insertions, 0 deletions
diff --git a/xsl/news.xsl b/xsl/news.xsl
new file mode 100644
index 0000000..7d41a2b
--- /dev/null
+++ b/xsl/news.xsl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="xml"/>
+<xsl:include href="identity.xsl"/>
+<xsl:include href="i18n.xsl"/>
+
+<xsl:variable name="lang" select="/html/@xml_lang"/>
+
+<xsl:template match="body">
+ <body>
+ <xsl:choose>
+ <xsl:when test="$lang = 'it'">
+ <h1>La storia di questo sito</h1>
+ </xsl:when>
+ <xsl:when test="$lang = 'en'">
+ <h1>Website history</h1>
+ </xsl:when>
+ </xsl:choose>
+ <dl>
+ <xsl:for-each select="item">
+ <xsl:sort select="date" data-type="number" order="descending"/>
+ <dt>
+ <xsl:call-template name="datestring">
+ <xsl:with-param name="lang" select="$lang"/>
+ <xsl:with-param name="date" select="date"/>
+ </xsl:call-template>
+ </dt>
+ <dd><xsl:apply-templates select="text"/></dd>
+ </xsl:for-each>
+ </dl>
+ </body>
+</xsl:template>
+
+<xsl:template match="text">
+ <xsl:copy-of select="./node()"/>
+</xsl:template>
+
+</xsl:stylesheet>