aboutsummaryrefslogtreecommitdiff
path: root/xsl/report.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'xsl/report.xsl')
-rw-r--r--xsl/report.xsl72
1 files changed, 72 insertions, 0 deletions
diff --git a/xsl/report.xsl b/xsl/report.xsl
new file mode 100644
index 0000000..5bb956c
--- /dev/null
+++ b/xsl/report.xsl
@@ -0,0 +1,72 @@
+<?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:template match="/html/head">
+ <head>
+ <xsl:apply-templates/>
+ <link rel="stylesheet" type="text/css" href="resolve:report-s"/>
+ </head>
+ </xsl:template>
+
+ <xsl:template match="proj">
+ <div class="proj">
+ <h3><xsl:choose>
+ <xsl:when test=".//head">
+ <xsl:value-of select=".//head"/>
+ </xsl:when>
+ <xsl:when test="count(.//tit) &lt; 4">
+ <xsl:for-each select=".//tit">
+ <xsl:if test="position() &gt; 1">, </xsl:if><xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="./descendant::tit[position() &lt; 4]">
+ <xsl:if test="position() &gt; 1">, </xsl:if><xsl:value-of select="."/>
+ </xsl:for-each>
+ , ...
+ </xsl:otherwise>
+ </xsl:choose></h3>
+ <xsl:apply-templates/>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="tit">
+ "<xsl:apply-templates/>"
+ </xsl:template>
+
+ <xsl:template match="loc">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="giorno">
+ <div class="giorno">
+ <h2><xsl:value-of select="@data"/></h2>
+ <xsl:apply-templates/>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="nota">
+ <div class="nota">
+ <xsl:if test="titolo"><h3><xsl:apply-templates select="titolo"/></h3></xsl:if>
+ <xsl:apply-templates select="node()[name()!='titolo']"/>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="callout">
+ <div class="callout">
+ <xsl:if test="titolo"><h3><xsl:apply-templates select="titolo"/></h3></xsl:if>
+ <xsl:apply-templates select="node()[name()!='titolo']"/>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="finale">
+ <span style="font-size: x-small">(seleziona per leggere il finale)</span>
+ <span class="hide">
+ <xsl:apply-templates/>
+ </span>
+ </xsl:template>
+
+</xsl:stylesheet>