Mercurial > dive4elements > river
comparison flys-artifacts/contrib/fixoverview2html.xsl @ 2632:7d163c2c6e6d
Improve XSL transformation for fixings overview output.
flys-artifacts/trunk@4251 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 17 Apr 2012 13:55:50 +0000 |
parents | 72f77b2210c2 |
children | d6e32ae72da6 |
comparison
equal
deleted
inserted
replaced
2631:87085ccea466 | 2632:7d163c2c6e6d |
---|---|
1 <?xml version="1.0" encoding="UTF-8"?> | 1 <?xml version="1.0" encoding="UTF-8"?> |
2 <xsl:stylesheet | 2 <xsl:stylesheet |
3 version="1.0" | 3 version="1.0" |
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | 4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
5 | 5 |
6 <xsl:output method="xml" encoding="UTF-8"/> | 6 <xsl:output method="xml" encoding="UTF-8" |
7 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" | |
8 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes"/> | |
9 | |
10 <xsl:param name="project-uuid">de3f3307-3429-4ff9-8f43-3fb2fcf21b27</xsl:param> | |
11 <xsl:param name="render-checkboxes" select="true()"/> | |
7 | 12 |
8 <xsl:template name="percent"> | 13 <xsl:template name="percent"> |
9 <xsl:param name="sector"/> | 14 <xsl:param name="sector"/> |
10 <xsl:variable name="rfrom" select="number(/fixings/river/@from)"/> | 15 <xsl:variable name="rfrom" select="number(/fixings/river/@from)"/> |
11 <xsl:variable name="rto" select="number(/fixings/river/@to)"/> | 16 <xsl:variable name="rto" select="number(/fixings/river/@to)"/> |
82 </div> | 87 </div> |
83 </xsl:template> | 88 </xsl:template> |
84 | 89 |
85 <xsl:template match="event"> | 90 <xsl:template match="event"> |
86 <tr> | 91 <tr> |
92 <xsl:if test="$render-checkboxes"> | |
93 <td> | |
94 <input type="checkbox" name="{$project-uuid}:{@cid}"/> | |
95 </td> | |
96 </xsl:if> | |
87 <td> | 97 <td> |
88 <xsl:apply-templates mode="sectors"/> | 98 <xsl:apply-templates mode="sectors"/> |
89 </td> | 99 </td> |
90 <td align="center"> | 100 <td align="center"> |
91 <xsl:attribute name="title"><xsl:value-of select="@name"/></xsl:attribute> | 101 <xsl:attribute name="title"><xsl:value-of select="@name"/></xsl:attribute> |
93 </td> | 103 </td> |
94 </tr> | 104 </tr> |
95 </xsl:template> | 105 </xsl:template> |
96 | 106 |
97 <xsl:template match="events"> | 107 <xsl:template match="events"> |
98 <table width="95%" border="1" cellspacing="0" cellpadding="0"> | 108 <table width="95%" border="1" cellspacing="0" cellpadding="0" style="font-size: 11pt;font-family:Arial;Verdana,sans-serif"> |
99 <colgroup> | 109 <colgroup> |
100 <col width="85%"/> | 110 <xsl:if test="$render-checkboxes"> |
101 <col width="15%"/> | 111 <col width="1em"/> |
112 </xsl:if> | |
113 <col width="*"/> | |
114 <col width="11em"/> | |
102 </colgroup> | 115 </colgroup> |
103 <xsl:apply-templates/> | 116 <xsl:apply-templates/> |
104 </table> | 117 </table> |
105 </xsl:template> | 118 </xsl:template> |
106 | 119 |