]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mowgli/home/xsl/publication.xsl
Initial commit of the XML/XSLT stuff.
[helm.git] / helm / mowgli / home / xsl / publication.xsl
diff --git a/helm/mowgli/home/xsl/publication.xsl b/helm/mowgli/home/xsl/publication.xsl
new file mode 100644 (file)
index 0000000..49a9b7b
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="html"/>
+
+<xsl:template match="/">
+ <html>
+  <head>
+   <title><xsl:value-of select="publication/title"/></title>
+   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+   <link rel="stylesheet" href="../../../style/mowgli.css" type="text/css"/>
+  </head>
+  <body>
+   <xsl:apply-templates/>
+  </body>
+ </html>
+</xsl:template>
+
+<xsl:template match="publication">
+ <h1><xsl:value-of select="title"/></h1>
+ <h2>
+  <xsl:for-each select="author">
+   <xsl:choose>
+    <xsl:when test="@file">
+     <a href="../../people/{@file}.html">
+      <xsl:value-of select="@file"/>
+     </a>
+    </xsl:when>
+    <xsl:otherwise>
+     <xsl:value-of select="surname"/>
+     <xsl:text>, </xsl:text>
+     <xsl:value-of select="name"/>
+    </xsl:otherwise>
+   </xsl:choose>
+   <xsl:if test="position() != last()">
+    <xsl:text> ; </xsl:text>
+   </xsl:if>
+  </xsl:for-each>
+ </h2>
+ <p><xsl:value-of select="where"/></p>
+</xsl:template>
+
+</xsl:stylesheet>