blob: 4585ab80a0e897d65dfc4df04e6ecbd291df21f9 [file] [log] [blame]
Daniel Veillardc9484202001-10-24 12:35:52 +00001<?xml version="1.0"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
Daniel Veillard1177ca42003-04-26 22:29:54 +00003 <xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
4 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
5 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
Daniel Veillard3bf65be2002-01-23 12:36:34 +00006
Daniel Veillardb72876d2003-11-12 00:40:33 +00007 <xsl:variable name="href_base">../</xsl:variable>
Daniel Veillardb8cfbd12001-10-25 10:53:28 +00008<!--
9 - returns the filename associated to an ID in the original file
10 -->
Daniel Veillard1177ca42003-04-26 22:29:54 +000011 <xsl:template name="tocfilename">
12 <xsl:param name="name" select="string(@href)"/>
13 <xsl:choose>
14 <xsl:when test="$name = '#Introducti'">
15 <xsl:text>intro.html</xsl:text>
16 </xsl:when>
17 <xsl:when test="$name = '#Documentat'">
18 <xsl:text>docs.html</xsl:text>
19 </xsl:when>
20 <xsl:when test="$name = '#Reporting'">
21 <xsl:text>bugs.html</xsl:text>
22 </xsl:when>
23 <xsl:when test="$name = '#help'">
24 <xsl:text>help.html</xsl:text>
25 </xsl:when>
26 <xsl:when test="$name = '#Help'">
27 <xsl:text>help.html</xsl:text>
28 </xsl:when>
29 <xsl:when test="$name = '#Downloads'">
30 <xsl:text>downloads.html</xsl:text>
31 </xsl:when>
32 <xsl:when test="$name = '#News'">
33 <xsl:text>news.html</xsl:text>
34 </xsl:when>
35 <xsl:when test="$name = '#Contributi'">
36 <xsl:text>contribs.html</xsl:text>
37 </xsl:when>
38 <xsl:when test="$name = '#xsltproc'">
39 <xsl:text>xsltproc2.html</xsl:text>
40 </xsl:when>
41 <xsl:when test="$name = '#API'">
42 <xsl:text></xsl:text>
43 </xsl:when>
44 <xsl:when test="$name = '#XSLT'">
45 <xsl:text>XSLT.html</xsl:text>
46 </xsl:when>
47 <xsl:when test="$name = '#XML'">
48 <xsl:text>XMLinfo.html</xsl:text>
49 </xsl:when>
50 <xsl:when test="$name = '#Validation'">
51 <xsl:text>xmldtd.html</xsl:text>
52 </xsl:when>
53 <xsl:when test="$name = '#tree'">
54 <xsl:text></xsl:text>
55 </xsl:when>
56 <xsl:when test="$name = '#library'">
57 <xsl:text></xsl:text>
58 </xsl:when>
59 <xsl:when test="$name = '#interface'">
60 <xsl:text></xsl:text>
61 </xsl:when>
62 <xsl:when test="$name = '#Example'">
63 <xsl:text></xsl:text>
64 </xsl:when>
65 <xsl:when test="$name = '#Entities'">
66 <xsl:text></xsl:text>
67 </xsl:when>
68 <xsl:when test="$name = '#architecture'">
69 <xsl:text></xsl:text>
70 </xsl:when>
71 <xsl:when test="$name = '#Namespaces'">
72 <xsl:text>namespaces.html</xsl:text>
73 </xsl:when>
74 <xsl:when test="$name = '#DOM'">
75 <xsl:text></xsl:text>
76 </xsl:when>
77 <xsl:when test="$name = '#Catalog'">
78 <xsl:text>catalog.html</xsl:text>
79 </xsl:when>
80 <xsl:when test="$name = '#Upgrading'">
81 <xsl:text></xsl:text>
82 </xsl:when>
83 <xsl:when test="$name = '#Encodings'">
84 <xsl:text>encoding.html</xsl:text>
85 </xsl:when>
86 <xsl:when test="$name = '#IO'">
87 <xsl:text></xsl:text>
88 </xsl:when>
89 <xsl:when test="$name = '#Memory'">
90 <xsl:text></xsl:text>
91 </xsl:when>
92 <xsl:when test="$name = '#Thread'">
93 <xsl:text></xsl:text>
94 </xsl:when>
95 <xsl:when test="$name = '#FAQ'">
96 <xsl:text>FAQ.html</xsl:text>
97 </xsl:when>
98 <xsl:when test="$name = '#Python'">
99 <xsl:text></xsl:text>
100 </xsl:when>
101 <xsl:when test="$name = ''">
102 <xsl:text>unknown.html</xsl:text>
103 </xsl:when>
104 <xsl:otherwise>
105 <xsl:value-of select="$name"/>
106 </xsl:otherwise>
107 </xsl:choose>
108 </xsl:template>
109 <xsl:template name="docfilename">
110 <xsl:param name="name" select="string(@href)"/>
111 <xsl:choose>
112 <xsl:when test="$name = '#Introducti'">
113 <xsl:text></xsl:text>
114 </xsl:when>
115 <xsl:when test="$name = '#Documentat'">
116 <xsl:text></xsl:text>
117 </xsl:when>
118 <xsl:when test="$name = '#Reporting'">
119 <xsl:text></xsl:text>
120 </xsl:when>
121 <xsl:when test="$name = '#help'">
122 <xsl:text></xsl:text>
123 </xsl:when>
124 <xsl:when test="$name = '#Help'">
125 <xsl:text></xsl:text>
126 </xsl:when>
127 <xsl:when test="$name = '#Downloads'">
128 <xsl:text></xsl:text>
129 </xsl:when>
130 <xsl:when test="$name = '#News'">
131 <xsl:text></xsl:text>
132 </xsl:when>
133 <xsl:when test="$name = '#Contributi'">
134 <xsl:text></xsl:text>
135 </xsl:when>
136 <xsl:when test="$name = '#xsltproc'">
137 <xsl:text>xsltproc2.html</xsl:text>
138 </xsl:when>
139 <xsl:when test="$name = '#API'">
140 <xsl:text>API.html</xsl:text>
141 </xsl:when>
142 <xsl:when test="$name = '#XSLT'">
143 <xsl:text>XSLT.html</xsl:text>
144 </xsl:when>
145 <xsl:when test="$name = '#XML'">
146 <xsl:text></xsl:text>
147 </xsl:when>
148 <xsl:when test="$name = '#Validation'">
149 <xsl:text></xsl:text>
150 </xsl:when>
151 <xsl:when test="$name = '#tree'">
152 <xsl:text>tree.html</xsl:text>
153 </xsl:when>
154 <xsl:when test="$name = '#library'">
155 <xsl:text>library.html</xsl:text>
156 </xsl:when>
157 <xsl:when test="$name = '#interface'">
158 <xsl:text>interface.html</xsl:text>
159 </xsl:when>
160 <xsl:when test="$name = '#Example'">
161 <xsl:text>example.html</xsl:text>
162 </xsl:when>
163 <xsl:when test="$name = '#Entities'">
164 <xsl:text>entities.html</xsl:text>
165 </xsl:when>
166 <xsl:when test="$name = '#architecture'">
167 <xsl:text>architecture.html</xsl:text>
168 </xsl:when>
169 <xsl:when test="$name = '#Namespaces'">
170 <xsl:text>namespaces.html</xsl:text>
171 </xsl:when>
172 <xsl:when test="$name = '#DOM'">
173 <xsl:text>DOM.html</xsl:text>
174 </xsl:when>
175 <xsl:when test="$name = '#Catalog'">
176 <xsl:text></xsl:text>
177 </xsl:when>
178 <xsl:when test="$name = '#Upgrading'">
179 <xsl:text>upgrade.html</xsl:text>
180 </xsl:when>
181 <xsl:when test="$name = '#Encodings'">
182 <xsl:text></xsl:text>
183 </xsl:when>
184 <xsl:when test="$name = '#IO'">
185 <xsl:text>xmlio.html</xsl:text>
186 </xsl:when>
187 <xsl:when test="$name = '#Memory'">
188 <xsl:text>xmlmem.html</xsl:text>
189 </xsl:when>
190 <xsl:when test="$name = '#Thread'">
191 <xsl:text>threads.html</xsl:text>
192 </xsl:when>
193 <xsl:when test="$name = '#FAQ'">
194 <xsl:text></xsl:text>
195 </xsl:when>
196 <xsl:when test="$name = '#Python'">
197 <xsl:text>python.html</xsl:text>
198 </xsl:when>
199 <xsl:when test="$name = ''">
200 <xsl:text>unknown.html</xsl:text>
201 </xsl:when>
202 <xsl:otherwise>
203 <xsl:value-of select="$name"/>
204 </xsl:otherwise>
205 </xsl:choose>
206 </xsl:template>
Daniel Veillardb8cfbd12001-10-25 10:53:28 +0000207 <xsl:template name="filename">
208 <xsl:param name="name" select="string(@href)"/>
209 <xsl:choose>
210 <xsl:when test="$name = '#Introducti'">
211 <xsl:text>intro.html</xsl:text>
212 </xsl:when>
213 <xsl:when test="$name = '#Documentat'">
214 <xsl:text>docs.html</xsl:text>
215 </xsl:when>
216 <xsl:when test="$name = '#Reporting'">
217 <xsl:text>bugs.html</xsl:text>
218 </xsl:when>
219 <xsl:when test="$name = '#help'">
220 <xsl:text>help.html</xsl:text>
221 </xsl:when>
222 <xsl:when test="$name = '#Help'">
223 <xsl:text>help.html</xsl:text>
224 </xsl:when>
225 <xsl:when test="$name = '#Downloads'">
226 <xsl:text>downloads.html</xsl:text>
227 </xsl:when>
228 <xsl:when test="$name = '#News'">
229 <xsl:text>news.html</xsl:text>
230 </xsl:when>
231 <xsl:when test="$name = '#Contributi'">
232 <xsl:text>contribs.html</xsl:text>
233 </xsl:when>
234 <xsl:when test="$name = '#xsltproc'">
235 <xsl:text>xsltproc2.html</xsl:text>
236 </xsl:when>
237 <xsl:when test="$name = '#API'">
238 <xsl:text>API.html</xsl:text>
239 </xsl:when>
240 <xsl:when test="$name = '#XSLT'">
241 <xsl:text>XSLT.html</xsl:text>
242 </xsl:when>
243 <xsl:when test="$name = '#XML'">
Daniel Veillard7b602b42002-01-08 13:26:00 +0000244 <xsl:text>XMLinfo.html</xsl:text>
Daniel Veillardb8cfbd12001-10-25 10:53:28 +0000245 </xsl:when>
246 <xsl:when test="$name = '#Validation'">
247 <xsl:text>xmldtd.html</xsl:text>
248 </xsl:when>
249 <xsl:when test="$name = '#tree'">
250 <xsl:text>tree.html</xsl:text>
251 </xsl:when>
252 <xsl:when test="$name = '#library'">
253 <xsl:text>library.html</xsl:text>
254 </xsl:when>
255 <xsl:when test="$name = '#interface'">
256 <xsl:text>interface.html</xsl:text>
257 </xsl:when>
258 <xsl:when test="$name = '#Example'">
259 <xsl:text>example.html</xsl:text>
260 </xsl:when>
261 <xsl:when test="$name = '#Entities'">
262 <xsl:text>entities.html</xsl:text>
263 </xsl:when>
264 <xsl:when test="$name = '#architecture'">
265 <xsl:text>architecture.html</xsl:text>
266 </xsl:when>
267 <xsl:when test="$name = '#Namespaces'">
268 <xsl:text>namespaces.html</xsl:text>
269 </xsl:when>
270 <xsl:when test="$name = '#DOM'">
271 <xsl:text>DOM.html</xsl:text>
272 </xsl:when>
273 <xsl:when test="$name = '#Catalog'">
274 <xsl:text>catalog.html</xsl:text>
275 </xsl:when>
276 <xsl:when test="$name = '#Upgrading'">
277 <xsl:text>upgrade.html</xsl:text>
278 </xsl:when>
279 <xsl:when test="$name = '#Encodings'">
280 <xsl:text>encoding.html</xsl:text>
281 </xsl:when>
282 <xsl:when test="$name = '#IO'">
283 <xsl:text>xmlio.html</xsl:text>
284 </xsl:when>
285 <xsl:when test="$name = '#Memory'">
286 <xsl:text>xmlmem.html</xsl:text>
287 </xsl:when>
Daniel Veillard52dcab32001-10-30 12:51:17 +0000288 <xsl:when test="$name = '#Thread'">
289 <xsl:text>threads.html</xsl:text>
290 </xsl:when>
Daniel Veillardb8cfbd12001-10-25 10:53:28 +0000291 <xsl:when test="$name = '#FAQ'">
292 <xsl:text>FAQ.html</xsl:text>
293 </xsl:when>
Daniel Veillard6dbcaf82002-02-20 14:37:47 +0000294 <xsl:when test="$name = '#Python'">
295 <xsl:text>python.html</xsl:text>
296 </xsl:when>
Daniel Veillardb8cfbd12001-10-25 10:53:28 +0000297 <xsl:when test="$name = ''">
298 <xsl:text>unknown.html</xsl:text>
299 </xsl:when>
300 <xsl:otherwise>
301 <xsl:value-of select="$name"/>
302 </xsl:otherwise>
303 </xsl:choose>
304 </xsl:template>
Daniel Veillardc9484202001-10-24 12:35:52 +0000305<!--
306 - The global title
307 -->
Daniel Veillardc9484202001-10-24 12:35:52 +0000308 <xsl:variable name="globaltitle" select="string(/html/body/h1[1])"/>
309<!--
310 - The table of content
311 -->
312 <xsl:variable name="toc">
Daniel Veillard4a603e42003-01-11 14:18:53 +0000313 <form action="search.php"
Daniel Veillard1177ca42003-04-26 22:29:54 +0000314 enctype="application/x-www-form-urlencoded" method="get">
315 <input name="query" type="text" size="20" value=""/>
Daniel Veillard4a603e42003-01-11 14:18:53 +0000316 <input name="submit" type="submit" value="Search ..."/>
317 </form>
Daniel Veillard8acca112002-01-21 09:52:27 +0000318 <ul><!-- style="margin-left: -1em" -->
Daniel Veillardc9484202001-10-24 12:35:52 +0000319 <li><a href="index.html">Home</a></li>
Daniel Veillardc9484202001-10-24 12:35:52 +0000320 <xsl:for-each select="/html/body/h2">
321 <xsl:variable name="filename">
Daniel Veillard1177ca42003-04-26 22:29:54 +0000322 <xsl:call-template name="tocfilename">
Daniel Veillardc9484202001-10-24 12:35:52 +0000323 <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
324 </xsl:call-template>
325 </xsl:variable>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000326 <xsl:if test="$filename != ''">
327 <li>
328 <xsl:element name="a">
329 <xsl:attribute name="href">
330 <xsl:value-of select="$filename"/>
331 </xsl:attribute>
Daniel Veillard66f68e72003-08-18 16:39:51 +0000332 <xsl:if test="$filename = 'docs.html'">
333 <xsl:attribute name="style">font-weight:bold</xsl:attribute>
334 </xsl:if>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000335 <xsl:value-of select="."/>
336 </xsl:element>
337 </li>
338 </xsl:if>
Daniel Veillardc9484202001-10-24 12:35:52 +0000339 </xsl:for-each>
Daniel Veillard7b4b2f92003-01-06 13:11:20 +0000340 <li><a href="guidelines.html">XML Guidelines</a></li>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000341 </ul>
342 </xsl:variable>
343 <xsl:variable name="develtoc">
344 <form action="search.php"
345 enctype="application/x-www-form-urlencoded" method="get">
346 <input name="query" type="text" size="20" value=""/>
347 <input name="submit" type="submit" value="Search ..."/>
348 </form>
349 <ul><!-- style="margin-left: -1em" -->
Daniel Veillard66f68e72003-08-18 16:39:51 +0000350 <li><a href="index.html" style="font-weight:bold">Main Menu</a></li>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000351 <li><a href="guidelines.html">XML Guidelines</a></li>
352 <li><a href="tutorial/index.html">Tutorial</a></li>
353 <li><a href="xmlreader.html">The Reader Interface</a></li>
354 <xsl:for-each select="/html/body/h2">
355 <xsl:variable name="filename">
356 <xsl:call-template name="docfilename">
357 <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
358 </xsl:call-template>
359 </xsl:variable>
360 <xsl:if test="$filename != ''">
361 <li>
362 <xsl:element name="a">
363 <xsl:attribute name="href">
364 <xsl:value-of select="$filename"/>
365 </xsl:attribute>
366 <xsl:value-of select="."/>
367 </xsl:element>
368 </li>
369 </xsl:if>
370 </xsl:for-each>
Daniel Veillard594cf0b2001-10-25 08:09:12 +0000371 <li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li>
372 </ul>
373 </xsl:variable>
Daniel Veillard3bf65be2002-01-23 12:36:34 +0000374 <xsl:variable name="api">
375 <ul><!-- style="margin-left: -1em" -->
Daniel Veillardf8592562002-01-23 17:58:17 +0000376 <li><a href="APIchunk0.html">Alphabetic</a></li>
Daniel Veillard3bf65be2002-01-23 12:36:34 +0000377 <li><a href="APIconstructors.html">Constructors</a></li>
378 <li><a href="APIfunctions.html">Functions/Types</a></li>
379 <li><a href="APIfiles.html">Modules</a></li>
380 <li><a href="APIsymbols.html">Symbols</a></li>
381 </ul>
382 </xsl:variable>
Daniel Veillard594cf0b2001-10-25 08:09:12 +0000383 <xsl:variable name="related">
Daniel Veillard8acca112002-01-21 09:52:27 +0000384 <ul><!-- style="margin-left: -1em" -->
Daniel Veillard594cf0b2001-10-25 08:09:12 +0000385 <li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li>
386 <li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li>
Daniel Veillard4a859202002-01-08 11:49:22 +0000387 <li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li>
Daniel Veillard2d347fa2002-03-17 10:34:11 +0000388 <li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li>
Daniel Veillard594cf0b2001-10-25 08:09:12 +0000389 <li><a href="ftp://xmlsoft.org/">FTP</a></li>
Daniel Veillardc84f8b52002-12-19 22:12:47 +0000390 <li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li>
Daniel Veillarddb9dfd92001-11-26 17:25:02 +0000391 <li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li>
Daniel Veillardcb7543b2002-09-09 10:54:06 +0000392 <li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li>
Daniel Veillarde6d8e202002-05-02 06:11:10 +0000393 <li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li>
Daniel Veillardccf996f2003-08-14 10:48:38 +0000394 <li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li>
Daniel Veillardc9484202001-10-24 12:35:52 +0000395 </ul>
396 </xsl:variable>
397 <xsl:template name="toc">
398 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
399 <tr>
400 <td>
401 <table width="100%" border="0" cellspacing="1" cellpadding="3">
402 <tr>
403 <td colspan="1" bgcolor="#eecfa1" align="center">
404 <center>
405 <b>Main Menu</b>
406 </center>
407 </td>
408 </tr>
409 <tr>
410 <td bgcolor="#fffacd">
411 <xsl:copy-of select="$toc"/>
412 </td>
413 </tr>
414 </table>
Daniel Veillard594cf0b2001-10-25 08:09:12 +0000415 <table width="100%" border="0" cellspacing="1" cellpadding="3">
416 <tr>
417 <td colspan="1" bgcolor="#eecfa1" align="center">
418 <center>
419 <b>Related links</b>
420 </center>
421 </td>
422 </tr>
423 <tr>
424 <td bgcolor="#fffacd">
425 <xsl:copy-of select="$related"/>
426 </td>
427 </tr>
428 </table>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000429 </td>
430 </tr>
431 </table>
432 </xsl:template>
433 <xsl:template name="develtoc">
434 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
435 <tr>
436 <td>
437 <table width="100%" border="0" cellspacing="1" cellpadding="3">
438 <tr>
439 <td colspan="1" bgcolor="#eecfa1" align="center">
440 <center>
441 <b>Developer Menu</b>
442 </center>
443 </td>
444 </tr>
445 <tr>
446 <td bgcolor="#fffacd">
447 <xsl:copy-of select="$develtoc"/>
448 </td>
449 </tr>
450 </table>
Daniel Veillard4a603e42003-01-11 14:18:53 +0000451 <table width="100%" border="0" cellspacing="1" cellpadding="3">
452 <tr>
453 <td colspan="1" bgcolor="#eecfa1" align="center">
454 <center>
455 <b>API Indexes</b>
456 </center>
457 </td>
458 </tr>
459 <tr>
460 <td bgcolor="#fffacd">
461 <xsl:copy-of select="$api"/>
462 </td>
463 </tr>
464 </table>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000465 <table width="100%" border="0" cellspacing="1" cellpadding="3">
466 <tr>
467 <td colspan="1" bgcolor="#eecfa1" align="center">
468 <center>
469 <b>Related links</b>
470 </center>
471 </td>
472 </tr>
473 <tr>
474 <td bgcolor="#fffacd">
475 <xsl:copy-of select="$related"/>
476 </td>
477 </tr>
478 </table>
Daniel Veillardc9484202001-10-24 12:35:52 +0000479 </td>
480 </tr>
481 </table>
482 </xsl:template>
483 <xsl:template mode="head" match="title">
484 <title>
485 <xsl:apply-templates/>
486 </title>
487 </xsl:template>
488 <xsl:template mode="head" match="meta">
489</xsl:template>
490<!--
491 - Write the styles in the head
492 -->
493 <xsl:template name="style">
Daniel Veillardc332dab2002-03-29 14:08:27 +0000494 <link rel="SHORTCUT ICON" href="/favicon.ico"/>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000495 <style type="text/css">
Daniel Veillard373a4752002-02-21 14:46:29 +0000496TD {font-family: Verdana,Arial,Helvetica}
497BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
498H1 {font-family: Verdana,Arial,Helvetica}
499H2 {font-family: Verdana,Arial,Helvetica}
500H3 {font-family: Verdana,Arial,Helvetica}
Daniel Veillardb8cfbd12001-10-25 10:53:28 +0000501A:link, A:visited, A:active { text-decoration: underline }
Daniel Veillard1177ca42003-04-26 22:29:54 +0000502</style>
Daniel Veillardc9484202001-10-24 12:35:52 +0000503 </xsl:template>
504<!--
505 - Write the title box on top
506 -->
507 <xsl:template name="titlebox">
508 <xsl:param name="title" select="'Main Page'"/>
509 <table border="0" width="100%" cellpadding="5" cellspacing="0" align="center">
510 <tr>
Daniel Veillard6c57dca2003-09-03 10:10:51 +0000511 <td width="120">
Daniel Veillardb72876d2003-11-12 00:40:33 +0000512 <a href="http://swpat.ffii.org/"><img src="{$href_base}epatents.png" alt="Action against software patents"/></a>
Daniel Veillard6c57dca2003-09-03 10:10:51 +0000513 </td>
Daniel Veillardc9484202001-10-24 12:35:52 +0000514 <td width="180">
Daniel Veillardb72876d2003-11-12 00:40:33 +0000515 <a href="http://www.gnome.org/"><img src="{$href_base}gnome2.png" alt="Gnome2 Logo"/></a>
516 <a href="http://www.w3.org/Status"><img src="{$href_base}w3c.png" alt="W3C Logo"/></a>
517 <a href="http://www.redhat.com/"><img src="{$href_base}redhat.gif" alt="Red Hat Logo"/></a>
Daniel Veillarde1662542002-08-28 11:50:59 +0000518 <div align="left">
Daniel Veillardb72876d2003-11-12 00:40:33 +0000519 <a href="http://xmlsoft.org/"><img src="{$href_base}Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo"/></a>
Daniel Veillarde1662542002-08-28 11:50:59 +0000520 </div>
Daniel Veillardc9484202001-10-24 12:35:52 +0000521 </td>
522 <td>
523 <table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000">
524 <tr>
525 <td>
526 <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd">
527 <tr>
528 <td align="center">
529 <xsl:element name="h1">
530 <xsl:value-of select="$globaltitle"/>
531 </xsl:element>
532 <xsl:element name="h2">
533 <xsl:value-of select="$title"/>
534 </xsl:element>
535 </td>
536 </tr>
537 </table>
538 </td>
539 </tr>
540 </table>
541 </td>
542 </tr>
543 </table>
544 </xsl:template>
545<!--
Daniel Veillardc9484202001-10-24 12:35:52 +0000546 - Handling of nodes in the body before the first H2, table of content
547 - Everything is just copied over, except href which may get rewritten
548 - and h1/h2/a at the top level
549 -->
550 <xsl:template priority="2" mode="subcontent" match="a">
551 <xsl:variable name="filename">
552 <xsl:call-template name="filename">
553 <xsl:with-param name="name" select="string(@href)"/>
554 </xsl:call-template>
555 </xsl:variable>
556 <xsl:copy>
557 <xsl:attribute name="href">
558 <xsl:value-of select="$filename"/>
559 </xsl:attribute>
560 <xsl:apply-templates mode="subcontent" select="node()"/>
561 </xsl:copy>
562 </xsl:template>
563 <xsl:template mode="subcontent" match="@*|node()">
564 <xsl:copy>
565 <xsl:apply-templates mode="subcontent" select="@*|node()"/>
566 </xsl:copy>
567 </xsl:template>
568 <xsl:template mode="content" match="@*|node()">
569 <xsl:if test="name() != 'h1' and name() != 'h2'">
570 <xsl:copy>
571 <xsl:apply-templates mode="subcontent" select="@*|node()"/>
572 </xsl:copy>
573 </xsl:if>
574 </xsl:template>
575<!--
576 - Handling of nodes in the body after an H2
577 - Open a new file and dump all the siblings up to the next H2
578 -->
579 <xsl:template name="subfile">
580 <xsl:param name="header" select="following-sibling::h2[1]"/>
581 <xsl:variable name="filename">
582 <xsl:call-template name="filename">
583 <xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
584 </xsl:call-template>
585 </xsl:variable>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000586 <xsl:variable name="tocfilename">
587 <xsl:call-template name="tocfilename">
588 <xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
589 </xsl:call-template>
590 </xsl:variable>
Daniel Veillardc9484202001-10-24 12:35:52 +0000591 <xsl:variable name="title">
592 <xsl:value-of select="$header"/>
593 </xsl:variable>
Daniel Veillard1177ca42003-04-26 22:29:54 +0000594 <xsl:document href="{$filename}" method="xml" encoding="ISO-8859-1"
595 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
596 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Daniel Veillardc9484202001-10-24 12:35:52 +0000597 <html>
598 <head>
599 <xsl:call-template name="style"/>
600 <xsl:element name="title">
601 <xsl:value-of select="$title"/>
602 </xsl:element>
603 </head>
604 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
605 <xsl:call-template name="titlebox">
606 <xsl:with-param name="title" select="$title"/>
607 </xsl:call-template>
608 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
609 <tr>
610 <td bgcolor="#8b7765">
611 <table border="0" cellspacing="0" cellpadding="2" width="100%">
612 <tr>
613 <td valign="top" width="200" bgcolor="#8b7765">
Daniel Veillard1177ca42003-04-26 22:29:54 +0000614 <xsl:choose>
615 <xsl:when test="$filename = 'docs.html'">
616 <xsl:call-template name="develtoc"/>
617 </xsl:when>
618 <xsl:when test="$tocfilename = ''">
619 <xsl:call-template name="develtoc"/>
620 </xsl:when>
621 <xsl:otherwise>
622 <xsl:call-template name="toc"/>
623 </xsl:otherwise>
624 </xsl:choose>
Daniel Veillardc9484202001-10-24 12:35:52 +0000625 </td>
626 <td valign="top" bgcolor="#8b7765">
627 <table border="0" cellspacing="0" cellpadding="1" width="100%">
628 <tr>
629 <td>
630 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
631 <tr>
632 <td>
633 <table border="0" cellpadding="3" cellspacing="1" width="100%">
634 <tr>
635 <td bgcolor="#fffacd">
636 <xsl:apply-templates mode="subfile" select="$header/following-sibling::*[preceding-sibling::h2[1] = $header and name() != 'h2' ]"/>
Daniel Veillard3f4c40f2002-02-13 09:19:28 +0000637 <p><a href="bugs.html">Daniel Veillard</a></p>
Daniel Veillardc9484202001-10-24 12:35:52 +0000638 </td>
639 </tr>
640 </table>
641 </td>
642 </tr>
643 </table>
644 </td>
645 </tr>
646 </table>
647 </td>
648 </tr>
649 </table>
650 </td>
651 </tr>
652 </table>
653 </body>
654 </html>
655 </xsl:document>
656 </xsl:template>
657 <xsl:template mode="subfile" match="@*|node()">
658 <xsl:copy>
659 <xsl:apply-templates mode="content" select="@*|node()"/>
660 </xsl:copy>
661 </xsl:template>
662<!--
663 - Handling of the initial body and head HTML document
664 -->
665 <xsl:template match="body">
666 <xsl:variable name="firsth2" select="./h2[1]"/>
667 <xsl:variable name="rest2" select="./h2[position()&gt;1]"/>
668 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
669 <xsl:call-template name="titlebox">
670 <xsl:with-param name="title" select="'libxml'"/>
671 </xsl:call-template>
672 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
673 <tr>
674 <td bgcolor="#8b7765">
675 <table border="0" cellspacing="0" cellpadding="2" width="100%">
676 <tr>
677 <td valign="top" width="200" bgcolor="#8b7765">
678 <xsl:call-template name="toc"/>
679 </td>
680 <td valign="top" bgcolor="#8b7765">
681 <table border="0" cellspacing="0" cellpadding="1" width="100%">
682 <tr>
683 <td>
684 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
685 <tr>
686 <td>
687 <table border="0" cellpadding="3" cellspacing="1" width="100%">
688 <tr>
689 <td bgcolor="#fffacd">
690 <xsl:apply-templates mode="content" select="($firsth2/preceding-sibling::*)"/>
691 <xsl:for-each select="./h2">
692 <xsl:call-template name="subfile">
693 <xsl:with-param name="header" select="."/>
694 </xsl:call-template>
695 </xsl:for-each>
Daniel Veillard3f4c40f2002-02-13 09:19:28 +0000696 <p><a href="bugs.html">Daniel Veillard</a></p>
Daniel Veillardc9484202001-10-24 12:35:52 +0000697 </td>
698 </tr>
699 </table>
700 </td>
701 </tr>
702 </table>
703 </td>
704 </tr>
705 </table>
706 </td>
707 </tr>
708 </table>
709 </td>
710 </tr>
711 </table>
712 </body>
713 </xsl:template>
714 <xsl:template match="head">
715 <head>
716 <xsl:call-template name="style"/>
717 <xsl:apply-templates mode="head"/>
718 </head>
719 </xsl:template>
720 <xsl:template match="html">
Daniel Veillard3bf65be2002-01-23 12:36:34 +0000721 <xsl:message>Generating the Web pages</xsl:message>
Daniel Veillardc9484202001-10-24 12:35:52 +0000722 <html>
723 <xsl:apply-templates/>
724 </html>
725 </xsl:template>
726</xsl:stylesheet>