]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mowgli/home/xsl/work-package.xsl
Initial commit of the XML/XSLT stuff.
[helm.git] / helm / mowgli / home / xsl / work-package.xsl
diff --git a/helm/mowgli/home/xsl/work-package.xsl b/helm/mowgli/home/xsl/work-package.xsl
new file mode 100644 (file)
index 0000000..62231d7
--- /dev/null
@@ -0,0 +1,72 @@
+<?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:text>Work Package </xsl:text>
+    <xsl:value-of select="work-package/@number"/>
+    <xsl:text>: </xsl:text>
+    <xsl:value-of select="work-package/name"/>
+   </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="work-package">
+ <h1>
+  <xsl:text>Work Package </xsl:text>
+  <xsl:value-of select="number"/>
+  <xsl:text>: </xsl:text>
+  <xsl:value-of select="name"/>
+ </h1>
+ <h2>Begin: <xsl:value-of select="begin"/></h2>
+ <h2>End: <xsl:value-of select="end"/></h2>
+ <table>
+  <tr>
+   <xsl:for-each select="person-month">
+    <td><xsl:value-of select="@participant"/></td>
+   </xsl:for-each>
+  </tr>
+  <tr>
+   <xsl:for-each select="person-month">
+    <td><xsl:value-of select="@number"/></td>
+   </xsl:for-each>
+  </tr>
+ </table>
+ <h2>Objectives:</h2>
+ <xsl:copy-of select="objectives/*"/>
+ <h2>Description:</h2>
+ <xsl:copy-of select="description/*"/>
+ <h2>Deliverables:</h2>
+ <ul>
+  <xsl:for-each select="deliverable">
+   <li>
+    <xsl:choose>
+     <xsl:when test="@file">
+      <a href="../deliverables/{@file}.html">
+       <xsl:value-of select="@file"/>
+      </a>
+     </xsl:when>
+     <xsl:otherwise>
+      <xsl:value-of select="."/>
+     </xsl:otherwise>
+    </xsl:choose>
+   </li>
+  </xsl:for-each>
+ </ul>
+ <h2>Milestones and Expected Results:</h2>
+ <xsl:copy-of select="milestone/*"/>
+</xsl:template>
+
+</xsl:stylesheet>