summaryrefslogtreecommitdiff
path: root/2005/d/dev/todo/tasklist.xsl
blob: ac4c7aaba8b03e88ca65b4456f2ce48d04f4c83e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:output method="html" indent="yes"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
    encoding="iso-8859-1"/>

  <xsl:template match="/">
    <xsl:apply-templates select="tasklist"/>
  </xsl:template>

  <xsl:template match="tasklist">
    <html>
      <head>
	<title>Liste des t�ches</title>
	<meta name="robot" content="noindex,nofollow"/>
	<link rel="stylesheet" href="tasklist.css" type="text/css"/>
      </head>
      <body>
	<p class="update"><xsl:value-of select="@update"/></p>
	<xsl:apply-templates select="task"/>
	<p>
	  <a href="http://validator.w3.org/check/referer"><img
	      border="0"
	      src="http://www.w3.org/Icons/valid-html401"
	      alt="Valid HTML 4.01!" height="31"
	      width="88"/></a>
	</p>

	<p>
	  <a href="http://jigsaw.w3.org/css-validator/check/referer">
	    <img style="border:0;width:88px;height:31px"
	      src="http://jigsaw.w3.org/css-validator/images/vcss"
	      alt="Valid CSS!"/>
	  </a>
	</p>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="task">
    <div class="task">
      <xsl:element name="div">
	<xsl:attribute name="class">
	  <xsl:choose>
	    <xsl:when test="status">taskbody-<xsl:value-of
		  select="status"/></xsl:when>
	    <xsl:otherwise>taskbody</xsl:otherwise>
	  </xsl:choose>
	</xsl:attribute>
	<div class="id"><xsl:value-of select="@id"/></div>
	<xsl:apply-templates select="name"/>
	<xsl:apply-templates select="desc"/>
	<xsl:if test="date|assignedto">
	  <div class="footer">
	    <xsl:apply-templates select="date"/>
	    <xsl:apply-templates select="assignedto"/>
	  </div>
	</xsl:if>
      </xsl:element>
      <div class="subtask">
	<xsl:apply-templates select="task"/>
      </div>
    </div>
  </xsl:template>

  <xsl:template match="name|date|assignedto|desc">
    <xsl:element name="div">
      <xsl:attribute name="class">
	<xsl:choose>
	  <xsl:when test="@status"><xsl:value-of
	      select="name()"/>-<xsl:value-of select="@status"/></xsl:when>
	  <xsl:otherwise><xsl:value-of select="name()"/></xsl:otherwise>
	</xsl:choose>
      </xsl:attribute>
      <xsl:value-of select="text()"/>
    </xsl:element>
  </xsl:template>

</xsl:stylesheet>