<?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) < 4">
<xsl:for-each select=".//tit">
<xsl:if test="position() > 1">, </xsl:if><xsl:value-of select="."/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="./descendant::tit[position() < 4]">
<xsl:if test="position() > 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>