aboutsummaryrefslogtreecommitdiff
path: root/xsl/report.xsl
blob: 5bb956c0a303bdda885d0dfba4575d7195d85bb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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>