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