Add comments and tiny improvements to STM32 flash loader algorithm
[openocd/openocdswd.git] / src / server / httpd / menu.xsl
blobb54f16c787770561b233c7b72d6c6dd5e7cfc3d6
1 <?xml version="1.0"?>
2 <!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40" version="1.0">
4 <xsl:output method="html" version="4.0" indent="yes" encoding="UTF-8"
6 media-type="text/plain; charset=UTF-8"/>
8 <xsl:param name="pagetogenerate" select="UNDEFINED"/>
9 <xsl:template match="page[outfile!=$pagetogenerate]">
10 </xsl:template>
12 <xsl:template match="page[outfile=$pagetogenerate]">
13 <xsl:variable name="Xlevel2parent" select="level2parent"/>
14 <xsl:variable name="Xlevel3parent" select="level3parent"/>
16 <html>
17 <head>
18 <title>OpenOCD debugger</title>
19 <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
20 <link href="menuweb.css" rel="stylesheet" type="text/css"/>
22 </head>
25 <tcl>
26 set console ""
27 set upload_filename /ram/upload
28 </tcl>
30 <body style="margin:0px;">
31 <div style="width:974px;height:85px;">
32 <div style="float:left;position:relative;left:32px;width:478px;">
33 <a href="/">
34 OpenOCD
35 </a>
36 </div>
37 <div style="float:left;position:relative;height:26px; width:278px;left:122px;background-image:url('menu_cuts/top_right.png');">
38 <div class="textlight" style="position:relative;left:15px;top:4px;">
39 <tcl>append buffer [capture version]</tcl>
40 </div>
41 </div>
42 </div>
43 <table style="padding:0px;border-collapse:collapse;">
44 <tr>
45 <td style="width:33px;">
46 <div style="width:20px;height:510px;">
47 &nbsp;
48 </div>
49 </td>
50 <!-- level 2 menu bar on left -->
51 <td style="vertical-align:top;height:100%;width:140px;padding:0px;">
52 <table style="padding:0px;border-collapse:collapse;height:100%;width:140px;">
53 <tr style="height:59px;">
54 <td></td>
55 </tr>
56 <xsl:for-each select="parent::language/page[outfile = $Xlevel2parent]/level2menu">
57 <tr>
58 <td>
59 <xsl:choose>
60 <xsl:when test="contains(@href, $pagetogenerate)">
61 <xsl:attribute name="style">width:140px;height:38px;background-image:url('menu_cuts/v_tab_selected.png');background-repeat: no-repeat;</xsl:attribute>
62 </xsl:when>
63 <xsl:otherwise>
64 <xsl:attribute name="style">width:140px;height:38px;background-image:url('menu_cuts/v_tab.png');background-repeat: no-repeat;</xsl:attribute>
65 </xsl:otherwise>
66 </xsl:choose>
67 <div style="position:relative;left:10px;top:10px;font-weight:bold;">
68 <a>
69 <xsl:attribute name="href">
70 <xsl:value-of select="@href"/>
71 </xsl:attribute>
72 <xsl:choose>
73 <xsl:when test="(@href = $pagetogenerate)">
74 <xsl:attribute name="style">font-weight: bold;</xsl:attribute>
75 </xsl:when>
76 <xsl:otherwise>
77 <xsl:choose>
78 <xsl:when test="(@href = $Xlevel3parent)">
79 <xsl:attribute name="style">font-weight: bold;</xsl:attribute>
80 </xsl:when>
81 <xsl:otherwise>
82 <xsl:attribute name="style"></xsl:attribute>
83 </xsl:otherwise>
84 </xsl:choose>
85 </xsl:otherwise>
86 </xsl:choose>
87 <xsl:value-of select="@title"/>
88 </a>
89 </div>
90 </td>
91 </tr>
92 </xsl:for-each>
93 <tr>
94 <td style="width:140px;height:35px;background-image:url('menu_cuts/v_1.png')">
96 </td>
97 </tr>
98 <tr>
99 <td style="width:140px;background-image:url('menu_cuts/v_2_tile.png')">
101 </td>
102 </tr>
103 <tr>
104 <td style="width:140px;height:140px;background-image:url('menu_cuts/v_3.png')">
106 </td>
107 </tr>
108 </table>
109 </td>
110 <!-- top level menu -->
111 <td style="vertical-align:top;padding:0px;height:100%">
112 <table style="padding:0px;border-collapse:collapse;height:100%;">
113 <tr>
114 <td>
115 <table style="padding:0px;border-collapse:collapse;">
116 <tr>
117 <xsl:for-each select="parent::language/page">
118 <xsl:if test="menutext">
119 <td>
120 <xsl:choose>
121 <xsl:when test="(outfile = $pagetogenerate) or (outfile = $Xlevel2parent)">
122 <xsl:attribute name="style">width:103px;height:29px;background-image:url('menu_cuts/h_tab1_selected.png');background-repeat: no-repeat;</xsl:attribute>
123 </xsl:when>
124 <xsl:otherwise>
125 <xsl:attribute name="style">width:103px;height:29px;background-image:url('menu_cuts/h_tab1.png');background-repeat: no-repeat;</xsl:attribute>
126 </xsl:otherwise>
127 </xsl:choose>
128 <div style="position:relative;top:7px;font-weight:bold;text-align:center;width:100px;">
130 <xsl:attribute name="href"><xsl:value-of select="menulink"/></xsl:attribute>
131 <xsl:if test="(outfile = $pagetogenerate)">
132 <xsl:attribute name="style">font-weight: bold;</xsl:attribute>
133 </xsl:if>
134 <xsl:if test="(outfile = $Xlevel2parent)">
135 <xsl:attribute name="style">font-weight: bold;</xsl:attribute>
136 </xsl:if>
137 <xsl:value-of select="menutext"/>
138 </a>
139 </div>
140 </td>
141 </xsl:if>
142 </xsl:for-each>
143 </tr>
144 </table>
145 </td>
146 </tr>
147 <tr>
148 <td colspan="6" style="height:30px;width:535px;background-image:url('menu_cuts/center_top.png');background-repeat: no-repeat;background-position:top right;">
149 <div style="width:500px;background-color:#ffffff;height:100%;">
150 &nbsp;
151 </div>
152 </td>
153 </tr>
154 <tr>
155 <td colspan="6" style="background-color:#ffffff;text-indent:30px;height:40px;">
156 <H1><xsl:value-of select="pageheading"/></H1>
157 </td>
158 </tr>
159 <tr style="height:100%;">
160 <td colspan="6" style="background-color:#ffffff;padding-left:30px;padding-right:30px;width=535px;height:100%;">
161 <xsl:value-of disable-output-escaping="yes" select="pagetext/markup_code"/>
162 </td>
163 </tr>
164 <tcl>
165 <!-- This is the output from any OpenOCD commands -->
166 set toggle_details [formfetch toggle_details]
167 if {[string length $toggle_details]==0} {
168 set toggle_details 0
170 set show_details [load_var show_details]
171 if {[string length $show_details]==0} {
172 set show_details 0
174 if {$toggle_details==1} {
175 set show_details [expr 1-$show_details]
176 save_var show_details $show_details
179 if {[string length $console]!=0} {
180 </tcl>
181 <tr style="height:100%;">
182 <td colspan="6" style="height:100%;background-color:red;">
183 <table class="textgray" style="padding:0px;border-collapse:collapse;background-color:#ffffff;width:100%">
184 <td style="width:25px;">&nbsp;</td>
185 <tcl>
186 if {$show_details==1} {
187 append buffer <xsl:text disable-output-escaping="yes"><![CDATA[<]]></xsl:text>
188 append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"}
189 append buffer <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
190 } else {
191 append buffer <xsl:text disable-output-escaping="yes"><![CDATA[<]]></xsl:text>
192 append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"}
193 append buffer <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
195 </tcl>
196 <a class="openocd">
197 <xsl:attribute name="href"><xsl:value-of select="$pagetogenerate"/>?toggle_details=1</xsl:attribute>
198 <tcl>
199 if {$show_details==1} {
200 append buffer "Hide details"
201 append buffer <br/>
202 } else {
203 append buffer {<div style="position:relative;top:7px;text-align:center;">}
204 append buffer "Show details"
205 append buffer {</div>}
207 </tcl>
208 </a>
209 <tcl>
210 if {$show_details==1} {
211 append buffer $console
213 </tcl>
214 <xsl:text disable-output-escaping="yes"><![CDATA[<]]></xsl:text>/td<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
215 <tcl>
216 if {$show_details!=1} {
217 append buffer {<td>&nbsp;</td>}
219 </tcl>
220 <td style="width:25px;">&nbsp;</td>
221 </table>
222 </td>
223 </tr>
224 <tcl>
226 </tcl>
227 <tr>
228 <td colspan="6" style="height:30px;background-image:url('menu_cuts/center_bottom.png');background-repeat: no-repeat;background-position:top right;">
229 <div style="width:500px;background-color:#ffffff;height:100%;">
230 &nbsp;
231 </div>
232 </td>
233 </tr>
234 </table>
235 </td>
236 <td style="width:6px;">
237 </td>
238 <td style="width:245px;height:100%">
239 <table style="padding:0px;border-collapse:collapse;height:100%;">
240 <tr>
241 <td style="width:103px;height:29px;background-image:url('menu_cuts/h_tab2_selected.png');background-repeat: no-repeat;">
242 <div class="textgray" style="position:relative;top:7px;;font-weight:bold;text-align:center;width:100px;">
243 Documentation
244 </div>
245 </td>
246 <td width="40px">
247 &nbsp;
248 </td>
249 <td>
250 </td>
251 </tr>
252 <tr>
253 <td colspan="3" style="height:10px;width:245px;background-image:url('menu_cuts/right_top_small.png');"></td>
254 </tr>
255 <tr>
256 <td colspan="3" style="background-color:#d8d7d7;width:245px;padding-left:10px;padding-buttom:10px;line-height:17px;">
257 <a href="http://openocd.berlios.de/doc/openocd.pdf" target="_blank">OpenOCD Manual</a><br/>
258 </td>
259 </tr>
260 <tr><td colspan="3" style="background-color:#d8d7d7;height:15px;"></td></tr>
261 <tr>
262 <td colspan="3">
263 <table style="padding:0px;border-collapse:collapse;">
264 <td style="background-color:#d8d7d7;width:10px;height:1px"></td>
265 <td style="background-color:#999999;width:225px; height:1px;"></td>
266 <td style="background-color:#d8d7d7;width:10px;height:1px"></td>
267 </table>
268 </td>
269 </tr>
270 <tr><td colspan="3" style="background-color:#d8d7d7;height:15px;"></td></tr>
271 <tr style="height:100%;">
272 <td class="textgray" colspan="3" style="height:100%;background-color:#d8d7d7;padding-left:10px;padding-right:10px;">
273 <xsl:choose>
274 <xsl:when test="(pagetext/right_column)">
275 <xsl:value-of disable-output-escaping="yes" select="pagetext/right_column"/>
276 </xsl:when>
277 <xsl:otherwise>
279 </xsl:otherwise>
280 </xsl:choose>
281 </td>
282 </tr>
283 <tr>
284 <td colspan="3" style="height:30px;background-image:url('menu_cuts/right_bottom.png');">
285 &nbsp;
286 </td>
287 </tr>
288 </table>
290 </td>
291 </tr>
293 </table>
294 </body>
295 </html>
297 </xsl:template>
298 </xsl:stylesheet>