]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/site.xsl
- more uniform layout
[helm.git] / helm / mowgli / home / xsl / site.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="html"/>
9
10 <xsl:template match="/">
11  <html>
12   <head>
13    <title><xsl:value-of select="site/name"/></title>
14    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
15    <link rel="stylesheet" href="../../style/mowgli.css" type="text/css"/>
16   </head>
17   <body>
18    <blockquote>
19     <xsl:call-template name="head"/>
20     <xsl:apply-templates/>
21     <xsl:call-template name="foot"/>
22    </blockquote>
23   </body>
24  </html>
25 </xsl:template>
26
27 <xsl:template match="site|subsite">
28  <xsl:choose>
29   <xsl:when test="subsite">
30    <p>This is an aggregate site, whose members are:</p>
31    <ul>
32     <xsl:for-each select="subsite">
33      <li>
34       <a href="#{generate-id()}">
35        <xsl:value-of select="name"/>
36       </a>
37      </li>
38     </xsl:for-each>
39    </ul>
40    <xsl:for-each select="subsite">
41     <hr />
42     <a name="{generate-id()}"/>
43     <xsl:apply-templates select="."/>
44    </xsl:for-each>
45   </xsl:when>
46   <xsl:otherwise>
47    <h1><xsl:value-of select="name"/></h1>
48    <h2><xsl:value-of select="country"/></h2>
49    <p><xsl:value-of select="address"/></p>
50    <p><a href="{url}">Visit the institution home page.</a></p>
51    <p>
52     <xsl:text>Site responsible: </xsl:text>
53     <a href="../people/{responsible/@file}.html">
54      <xsl:call-template name="person-name">
55       <xsl:with-param name="file" select="responsible/@file"/>
56      </xsl:call-template>
57     </a>
58     <xsl:text>.</xsl:text>
59    </p>
60    <xsl:copy-of select="description/*"/>
61    <xsl:if test="project">
62     <h1>Projects developed by this site related to MOWGLI:</h1>
63    </xsl:if>
64    <xsl:apply-templates select="project"/>
65   </xsl:otherwise>
66  </xsl:choose>
67 </xsl:template>
68
69 <xsl:template match="project">
70  <h2>
71   <xsl:value-of select="name"/>
72   <xsl:if test="acronym">
73    <xsl:text> (</xsl:text>
74    <xsl:value-of select="acronym"/>
75    <xsl:text>)</xsl:text>
76   </xsl:if>
77  </h2>
78  <p><a href="{url}">Visit the project home page.</a></p>
79  <p>Members of the project also involved in MOWGLI:</p>
80  <ul>
81   <xsl:for-each select="member">
82    <li>
83     <a href="../people/{@file}.html">
84      <xsl:call-template name="person-name">
85       <xsl:with-param name="file" select="@file"/>
86      </xsl:call-template>
87     </a>
88    </li>
89   </xsl:for-each>
90  </ul>
91  <xsl:copy-of select="description/*"/>
92 </xsl:template>
93
94 </xsl:stylesheet>