]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/publication.xsl
Initial commit of the XML/XSLT stuff.
[helm.git] / helm / mowgli / home / xsl / publication.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:output method="html"/>
7
8 <xsl:template match="/">
9  <html>
10   <head>
11    <title><xsl:value-of select="publication/title"/></title>
12    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
13    <link rel="stylesheet" href="../../../style/mowgli.css" type="text/css"/>
14   </head>
15   <body>
16    <xsl:apply-templates/>
17   </body>
18  </html>
19 </xsl:template>
20
21 <xsl:template match="publication">
22  <h1><xsl:value-of select="title"/></h1>
23  <h2>
24   <xsl:for-each select="author">
25    <xsl:choose>
26     <xsl:when test="@file">
27      <a href="../../people/{@file}.html">
28       <xsl:value-of select="@file"/>
29      </a>
30     </xsl:when>
31     <xsl:otherwise>
32      <xsl:value-of select="surname"/>
33      <xsl:text>, </xsl:text>
34      <xsl:value-of select="name"/>
35     </xsl:otherwise>
36    </xsl:choose>
37    <xsl:if test="position() != last()">
38     <xsl:text> ; </xsl:text>
39    </xsl:if>
40   </xsl:for-each>
41  </h2>
42  <p><xsl:value-of select="where"/></p>
43 </xsl:template>
44
45 </xsl:stylesheet>