]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/work-package.xsl
Great changes in all the stylesheets. Every page is now generated in two
[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:import href="common.xsl"/>
7
8 <xsl:output method="xml"/>
9
10 <xsl:template match="/">
11  <html>
12   <head>
13    <title>
14     <xsl:text>Work Package </xsl:text>
15     <xsl:value-of select="work-package/@number"/>
16     <xsl:text>: </xsl:text>
17     <xsl:value-of select="work-package/name"/>
18    </title>
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:apply-templates 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:variable name="deliverable"
59                      select="document(concat('../xml/deliverables/',@file,'.xml'))/deliverable"/>
60        <xsl:value-of select="$deliverable/@id"/>
61        <xsl:text> </xsl:text>
62        <xsl:value-of select="$deliverable/name"/>
63       </a>
64      </xsl:when>
65      <xsl:otherwise>
66       <xsl:value-of select="."/>
67      </xsl:otherwise>
68     </xsl:choose>
69    </li>
70   </xsl:for-each>
71  </ul>
72  <h2>Milestones and Expected Results:</h2>
73  <xsl:copy-of select="milestones/*"/>
74 </xsl:template>
75
76 <xsl:template match="tasks">
77  <dl>
78   <xsl:apply-templates/>
79  </dl>
80 </xsl:template>
81
82 <xsl:template match="task">
83  <dt>
84   <a name="{@id}"/>
85   <xsl:value-of select="@id"/>
86   <xsl:text> </xsl:text>
87   <xsl:value-of select="name"/>
88  </dt>
89  <dd>
90   <xsl:copy-of select="*"/>
91  </dd>
92 </xsl:template>
93
94 <xsl:template name="p|ul|dl">
95  <xsl:copy-of select="."/>
96 </xsl:template>
97
98 </xsl:stylesheet>