]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/publications-index.xsl
Broken links fixed somehow.
[helm.git] / helm / mowgli / home / xsl / publications-index.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="publications">
11  <html>
12   <head>
13    <title>List of Publications</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     <xsl:call-template name="head">
19      <xsl:with-param name="path_to_top" select="'..'"/>
20     </xsl:call-template>
21     <h1>Publications</h1>
22     <h2>About MoWGLI</h2>
23     <xsl:apply-templates select="project"/>
24     <h2>Related Publications</h2>
25     <a name="related"/>
26     <xsl:apply-templates select="related"/>
27     <xsl:call-template name="foot">
28      <xsl:with-param name="path_to_top" select="'..'"/>
29     </xsl:call-template>
30   </body>
31  </html>
32 </xsl:template>
33
34 <xsl:template match="project">
35   <xsl:choose>
36     <xsl:when test="entry">
37       <ul>
38         <xsl:apply-templates select="entry">
39           <xsl:with-param name="section" select="'mowgli'"/>
40         </xsl:apply-templates>
41       </ul>
42     </xsl:when>
43     <xsl:otherwise>
44       None.
45     </xsl:otherwise>
46   </xsl:choose>
47 </xsl:template>
48
49 <xsl:template match="related">
50   <xsl:choose>
51     <xsl:when test="entry">
52       <ul>
53         <xsl:apply-templates select="entry">
54           <xsl:with-param name="section" select="'others'"/>
55         </xsl:apply-templates>
56       </ul>
57     </xsl:when>
58     <xsl:otherwise>
59       None.
60     </xsl:otherwise>
61   </xsl:choose>
62 </xsl:template>
63
64 <xsl:template match="entry">
65  <xsl:param name="section" select="''"/>
66  <xsl:variable name="file" select="document(concat('../xml/publications/',$section,'/',@file,'.xml'))/publication"/>
67  <li>
68   <xsl:apply-templates select="$file/author"/>,
69   <a href="{$section}/{@file}.html">
70    <xsl:text>``</xsl:text>
71    <xsl:value-of select="$file/title"/>
72    <xsl:text>''</xsl:text>
73   </a>
74  </li>
75 </xsl:template>
76
77 <xsl:template match="author">
78  <xsl:choose>
79   <xsl:when test="@file">
80    <xsl:call-template name="person-name">
81     <xsl:with-param name="file" select="@file"/>
82    </xsl:call-template>
83   </xsl:when>
84   <xsl:otherwise>
85    <xsl:value-of select="surname"/>, <xsl:value-of select="name"/>
86   </xsl:otherwise>
87  </xsl:choose>
88  <xsl:if test="position() &lt; last()">, </xsl:if>
89 </xsl:template>
90
91 </xsl:stylesheet>
92