]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/minutes.xsl
ocaml 3.09 transition
[helm.git] / helm / mowgli / home / xsl / minutes.xsl
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet version="1.0"
4                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
6 <xsl:import href="common.xsl"/>
7
8 <xsl:output method="xml"/>
9
10 <xsl:template match="/">
11  <html>
12   <head>
13    <title>
14     <xsl:text>Summary of </xsl:text>
15     <xsl:value-of select="minutes/about"/>
16    </title>
17   </head>
18   <body>
19    <h1>Summary of <xsl:value-of select="minutes/about"/></h1>
20    <h2>Participants:</h2>
21    <ul>
22     <xsl:apply-templates select="minutes/participant">
23      <xsl:sort select="document(concat('../xml/people/',@site,'/',@file,'.xml'))/*/surname"/>
24     </xsl:apply-templates>
25    </ul>
26    <h2>Presentations:</h2>
27    <dl>
28     <xsl:apply-templates select="minutes/presentation"/>
29    </dl>
30    <h2>Minutes:</h2>
31    <p>
32     <span style="font-weight: bold">Note:</span>
33     The following entries reports only the important observations raised during
34     the meeting and the decisions taken.
35    </p>
36    <ul>
37     <xsl:apply-templates select="minutes/entry"/>
38    </ul>
39   </body>
40  </html>
41 </xsl:template>
42
43 <xsl:template match="entry">
44  <li>
45   <xsl:if test="@author">
46    <xsl:text>[</xsl:text>
47     <a href="../people/{@author}.html">
48      <xsl:call-template name="person-name">
49       <xsl:with-param name="file" select="@author"/>
50      </xsl:call-template>
51     </a>
52    <xsl:text>]</xsl:text>
53   </xsl:if>
54   <xsl:apply-templates/>
55  </li>
56 </xsl:template>
57
58 <xsl:template match="participant">
59  <li>
60   <a href="../people/{@site}/{@file}.html">
61    <xsl:call-template name="person-name">
62     <xsl:with-param name="file" select="concat(@site,'/',@file)"/>
63    </xsl:call-template>
64   </a>
65   <xsl:text>&#x0A0;&#x0A0;(</xsl:text>
66   <a href="../sites/{@site}.html">
67    <xsl:value-of select="@site"/>
68   </a>
69   <xsl:text>)</xsl:text>
70  </li>
71 </xsl:template>
72
73 <xsl:template match="presentation">
74  <dt>
75   <a href="../people/{@site}/{@author}.html">
76    <xsl:call-template name="person-name">
77     <xsl:with-param name="file" select="concat(@site,'/',@author)"/>
78    </xsl:call-template>
79   </a>
80   <xsl:text>&#x0A0;(</xsl:text>
81   <a href="../sites/{@site}.html">
82    <xsl:value-of select="@site"/>
83   </a>
84   <xsl:text>): </xsl:text>
85   <xsl:if test="@media = 'slides'">
86    <xsl:choose>
87     <xsl:when test="slides">
88      <xsl:for-each select="slides">
89       <xsl:text>[</xsl:text>
90       <xsl:variable name="location">
91        <xsl:choose>
92         <xsl:when test="@format = 'HTML'">
93          <xsl:value-of select="concat('../slides/',@file)"/>
94         </xsl:when>
95         <xsl:otherwise>
96          <xsl:value-of select="concat('../../misc/',@file)"/>
97         </xsl:otherwise>
98        </xsl:choose>
99       </xsl:variable>
100       <a href="{$location}">
101        <xsl:text>Get the slides</xsl:text>
102        <xsl:if test="text()">
103         <xsl:text> </xsl:text>
104         <xsl:value-of select="text()"/>
105        </xsl:if>
106       </a>
107       <xsl:text>]</xsl:text>
108      </xsl:for-each>
109     </xsl:when>
110     <xsl:otherwise>
111      <xsl:text>[slides unavailable]</xsl:text>
112     </xsl:otherwise>
113    </xsl:choose>
114   </xsl:if>
115  </dt>
116  <dd>
117   <xsl:copy-of select="description/*|description/text()"/>
118  </dd>
119 </xsl:template>
120
121 </xsl:stylesheet>