]> matita.cs.unibo.it Git - helm.git/blob - helm/mowgli/home/xsl/work-packages_index.xsl
Work-packages DTD improved (tasks now have an identifier and a name).
[helm.git] / helm / mowgli / home / xsl / work-packages_index.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="html"/>
9
10 <xsl:template match="/">
11  <html>
12   <head>
13    <title>Work Packages</title>
14    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
15    <link rel="stylesheet" href="../../style/mowgli.css" type="text/css"/>
16   </head>
17   <body>
18    <xsl:apply-templates/>
19   </body>
20  </html>
21 </xsl:template>
22
23 <xsl:template match="work-packages">
24  <h1>Work Packages</h1>
25  <table>
26   <xsl:apply-templates/>
27  </table>
28 </xsl:template>
29
30 <xsl:template match="work-package">
31  <xsl:variable name="work-package"
32                select="document(concat('../xml/work-packages/',@file,'.xml'))/work-package"/>
33  <tr>
34   <td valign="top"><xsl:value-of select="$work-package/@number"/>.</td>
35   <td>
36    <a href="{@file}.html">
37     <xsl:value-of select="$work-package/name"/>
38    </a>
39    <xsl:apply-templates select="$work-package/description/tasks">
40     <xsl:with-param name="url" select="concat(@file,'.html')"/>
41    </xsl:apply-templates>
42   </td>
43  </tr>
44 </xsl:template>
45
46 <xsl:template match="tasks">
47  <xsl:param name="url"/>
48  <ul>
49   <xsl:apply-templates>
50    <xsl:with-param name="url" select="$url"/>
51   </xsl:apply-templates>
52  </ul>
53 </xsl:template>
54
55 <xsl:template match="task">
56  <xsl:param name="url"/>
57  <li>
58   <a href="{$url}#{@id}">
59    <xsl:value-of select="@id"/>
60    <xsl:text> </xsl:text>
61    <xsl:value-of select="name"/>
62   </a>
63  </li>
64 </xsl:template>
65
66 </xsl:stylesheet>