]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/work-package.xsl
Initial commit of the XML/XSLT stuff.
[helm.git] / helm / mowgli / home / xsl / work-package.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>
12     <xsl:text>Work Package </xsl:text>
13     <xsl:value-of select="work-package/@number"/>
14     <xsl:text>: </xsl:text>
15     <xsl:value-of select="work-package/name"/>
16    </title>
17    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
18    <link rel="stylesheet" href="../../style/mowgli.css" type="text/css"/>
19   </head>
20   <body>
21    <xsl:apply-templates/>
22   </body>
23  </html>
24 </xsl:template>
25
26 <xsl:template match="work-package">
27  <h1>
28   <xsl:text>Work Package </xsl:text>
29   <xsl:value-of select="number"/>
30   <xsl:text>: </xsl:text>
31   <xsl:value-of select="name"/>
32  </h1>
33  <h2>Begin: <xsl:value-of select="begin"/></h2>
34  <h2>End: <xsl:value-of select="end"/></h2>
35  <table>
36   <tr>
37    <xsl:for-each select="person-month">
38     <td><xsl:value-of select="@participant"/></td>
39    </xsl:for-each>
40   </tr>
41   <tr>
42    <xsl:for-each select="person-month">
43     <td><xsl:value-of select="@number"/></td>
44    </xsl:for-each>
45   </tr>
46  </table>
47  <h2>Objectives:</h2>
48  <xsl:copy-of select="objectives/*"/>
49  <h2>Description:</h2>
50  <xsl:copy-of select="description/*"/>
51  <h2>Deliverables:</h2>
52  <ul>
53   <xsl:for-each select="deliverable">
54    <li>
55     <xsl:choose>
56      <xsl:when test="@file">
57       <a href="../deliverables/{@file}.html">
58        <xsl:value-of select="@file"/>
59       </a>
60      </xsl:when>
61      <xsl:otherwise>
62       <xsl:value-of select="."/>
63      </xsl:otherwise>
64     </xsl:choose>
65    </li>
66   </xsl:for-each>
67  </ul>
68  <h2>Milestones and Expected Results:</h2>
69  <xsl:copy-of select="milestone/*"/>
70 </xsl:template>
71
72 </xsl:stylesheet>