]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/news.xsl
ocaml 3.09 transition
[helm.git] / helm / mowgli / home / xsl / news.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>News Archive</title>
14   </head>
15   <body>
16     <h1>News Archive</h1>
17     <dl>
18      <xsl:apply-templates/>
19     </dl>
20   </body>
21  </html>
22 </xsl:template>
23
24 <xsl:template match="event">
25  <xsl:param name="small" select="false()"/>
26  <dt>
27   <b>
28    <xsl:call-template name="print_date">
29     <xsl:with-param name="date" select="date"/>
30    </xsl:call-template>
31   </b>
32   <xsl:if test="header">
33    <xsl:value-of select="' -- '"/>
34    <em>
35     <xsl:value-of select="header"/>
36    </em>
37   </xsl:if>
38  </dt>
39  <dd>
40   <xsl:copy-of select="description/*|description/text()"/>
41   <xsl:if test="not($small) and who">
42    <br/><br/>
43    <div class="right">
44     <xsl:variable name="who" select="document(concat('../xml/people/',who/@file,'.xml'))/person"/>
45     <em>
46      <a href="people/{who/@file}.html">
47       <div class="small">
48        <xsl:call-template name="person-name">
49         <xsl:with-param name="file" select="who/@file"/>
50        </xsl:call-template>
51       </div>
52      </a>
53     </em>
54    </div>
55   </xsl:if>
56  </dd>
57 </xsl:template>
58
59 </xsl:stylesheet>