]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/news.xsl
* A new news
[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><xsl:value-of select="date"/></b>
28   <xsl:if test="header">
29    <xsl:value-of select="' -- '"/>
30    <em>
31     <xsl:value-of select="header"/>
32    </em>
33   </xsl:if>
34  </dt>
35  <dd>
36   <xsl:copy-of select="description/*|description/text()"/>
37   <xsl:if test="not($small) and who">
38    <br/><br/>
39    <div class="right">
40     <xsl:variable name="who" select="document(concat('../xml/people/',who/@file,'.xml'))/person"/>
41     <em>
42      <a href="people/{who/@file}.html">
43       <div class="small">
44        <xsl:call-template name="person-name">
45         <xsl:with-param name="file" select="who/@file"/>
46        </xsl:call-template>
47       </div>
48      </a>
49     </em>
50    </div>
51   </xsl:if>
52  </dd>
53 </xsl:template>
54
55 </xsl:stylesheet>