]> Git — Sourcephile - julm/air-duino.git/blob - xsl/year/month.html5.xsl
update, using nix
[julm/air-duino.git] / xsl / year / month.html5.xsl
1 <?xml version='1.0'?>
2 <xsl:transform version='1.0'
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4 <xsl:output doctype-system="about:legacy-compat"
5 encoding="UTF-8" indent="yes" method="html"/>
6 <xsl:param name="refresh-interval" select="'60'"/>
7 <xsl:template match="report">
8 <html>
9 <head>
10 <title>Air <xsl:value-of select="@year"/>/<xsl:value-of select="@month"/></title>
11 <meta name="generator">
12 <xsl:text>tool/air/xsl/year/month.html5.xsl</xsl:text>
13 <xsl:text>, </xsl:text>
14 <xsl:value-of select="
15 concat('XSL processor: ',system-property('xsl:vendor')
16 ,' &lt;',system-property('xsl:vendor-url'),'&gt;')"/>
17 </meta>
18 <style type="text/css" rel="stylesheet">
19 td.date {
20 font-family:monospace;
21 font-weight:bold;
22 text-align:center;
23 vertical-align:top;
24 }
25 td.date > a {
26 text-decoration:none;
27 }
28 </style>
29 <script type="application/javascript">
30 var PageRefresh = {};
31 PageRefresh.interval = <xsl:value-of select="$refresh-interval"/>;
32 PageRefresh.refresh = function() {
33 window.setTimeout(function(){
34 window.location.reload(true);
35 setTimeout(arguments.callee, PageRefresh.interval * 1000);
36 }, PageRefresh.interval * 1000);
37 }
38 </script>
39 </head>
40 <body onload="PageRefresh.refresh()">
41 <table class="graphs">
42 <tbody>
43 <xsl:apply-templates/>
44 </tbody>
45 </table>
46 </body>
47 </html>
48 </xsl:template>
49 <xsl:template match="date">
50 <tr>
51 <td class="date" id="day.{@day}">
52 <a href="#day.{@day}">
53 <xsl:value-of select="ancestor::*/@year"
54 />/<xsl:value-of select="ancestor::*/@month"
55 />/<xsl:value-of select="@day"/>
56 <br/>
57 <xsl:value-of select="@day-name"/>
58 </a>
59 </td>
60 <td class="graphs">
61 <table class="date-graphs">
62 <tbody>
63 <xsl:apply-templates/>
64 </tbody>
65 </table>
66 </td>
67 </tr>
68 </xsl:template>
69 <xsl:template match="sensor">
70 <tr>
71 <td class="graph" id="day.{ancestor::*/@day}.{@name}">
72 <img src="../{@name}/{ancestor::*/@year}/{ancestor::*/@month}/{ancestor::*/@day}.png"/>
73 </td>
74 </tr>
75 </xsl:template>
76 </xsl:transform>