updated libxml2 to 2.5.10
[TestXSLT.git] / libxml2 / doc / site.xsl
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:value-of select="."/>
332             </xsl:element>
333           </li>
334         </xsl:if>
335       </xsl:for-each>
336       <li><a href="guidelines.html">XML Guidelines</a></li>
337     </ul>
338   </xsl:variable>
339   <xsl:variable name="develtoc">
340     <form action="search.php"
341           enctype="application/x-www-form-urlencoded" method="get">
342       <input name="query" type="text" size="20" value=""/>
343       <input name="submit" type="submit" value="Search ..."/>
344     </form>
345     <ul><!-- style="margin-left: -1em" -->
346       <li><a href="index.html">Home</a></li>
347       <li><a href="guidelines.html">XML Guidelines</a></li>
348       <li><a href="tutorial/index.html">Tutorial</a></li>
349       <li><a href="xmlreader.html">The Reader Interface</a></li>
350       <xsl:for-each select="/html/body/h2">
351         <xsl:variable name="filename">
352           <xsl:call-template name="docfilename">
353             <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
354           </xsl:call-template>
355         </xsl:variable>
356         <xsl:if test="$filename != ''">
357           <li>
358             <xsl:element name="a">
359               <xsl:attribute name="href">
360                 <xsl:value-of select="$filename"/>
361               </xsl:attribute>
362               <xsl:value-of select="."/>
363             </xsl:element>
364           </li>
365         </xsl:if>
366       </xsl:for-each>
367       <li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li>
368     </ul>
369   </xsl:variable>
370   <xsl:variable name="api">
371     <ul><!-- style="margin-left: -1em" -->
372       <li><a href="APIchunk0.html">Alphabetic</a></li>
373       <li><a href="APIconstructors.html">Constructors</a></li>
374       <li><a href="APIfunctions.html">Functions/Types</a></li>
375       <li><a href="APIfiles.html">Modules</a></li>
376       <li><a href="APIsymbols.html">Symbols</a></li>
377     </ul>
378   </xsl:variable>
379   <xsl:variable name="related">
380     <ul><!-- style="margin-left: -1em" -->
381       <li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li>
382       <li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li>
383       <li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li>
384       <li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li>
385       <li><a href="ftp://xmlsoft.org/">FTP</a></li>
386       <li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li>
387       <li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li>
388       <li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li>
389       <li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li>
390       <li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li>
391     </ul>
392   </xsl:variable>
393   <xsl:template name="toc">
394     <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
395       <tr>
396         <td>
397           <table width="100%" border="0" cellspacing="1" cellpadding="3">
398             <tr>
399               <td colspan="1" bgcolor="#eecfa1" align="center">
400                 <center>
401                   <b>Main Menu</b>
402                 </center>
403               </td>
404             </tr>
405             <tr>
406               <td bgcolor="#fffacd">
407                 <xsl:copy-of select="$toc"/>
408               </td>
409             </tr>
410           </table>
411           <table width="100%" border="0" cellspacing="1" cellpadding="3">
412             <tr>
413               <td colspan="1" bgcolor="#eecfa1" align="center">
414                 <center>
415                   <b>Related links</b>
416                 </center>
417               </td>
418             </tr>
419             <tr>
420               <td bgcolor="#fffacd">
421                 <xsl:copy-of select="$related"/>
422               </td>
423             </tr>
424           </table>
425         </td>
426       </tr>
427     </table>
428   </xsl:template>
429   <xsl:template name="develtoc">
430     <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
431       <tr>
432         <td>
433           <table width="100%" border="0" cellspacing="1" cellpadding="3">
434             <tr>
435               <td colspan="1" bgcolor="#eecfa1" align="center">
436                 <center>
437                   <b>Developer Menu</b>
438                 </center>
439               </td>
440             </tr>
441             <tr>
442               <td bgcolor="#fffacd">
443                 <xsl:copy-of select="$develtoc"/>
444               </td>
445             </tr>
446           </table>
447           <table width="100%" border="0" cellspacing="1" cellpadding="3">
448             <tr>
449               <td colspan="1" bgcolor="#eecfa1" align="center">
450                 <center>
451                   <b>API Indexes</b>
452                 </center>
453               </td>
454             </tr>
455             <tr>
456               <td bgcolor="#fffacd">
457                 <xsl:copy-of select="$api"/>
458               </td>
459             </tr>
460           </table>
461           <table width="100%" border="0" cellspacing="1" cellpadding="3">
462             <tr>
463               <td colspan="1" bgcolor="#eecfa1" align="center">
464                 <center>
465                   <b>Related links</b>
466                 </center>
467               </td>
468             </tr>
469             <tr>
470               <td bgcolor="#fffacd">
471                 <xsl:copy-of select="$related"/>
472               </td>
473             </tr>
474           </table>
475         </td>
476       </tr>
477     </table>
478   </xsl:template>
479   <xsl:template mode="head" match="title">
480     <title>
481       <xsl:apply-templates/>
482     </title>
483   </xsl:template>
484   <xsl:template mode="head" match="meta">
485 </xsl:template>
486 <!--
487  - Write the styles in the head
488  -->
489   <xsl:template name="style">
490     <link rel="SHORTCUT ICON" href="/favicon.ico"/> 
491     <style type="text/css">
492 TD {font-family: Verdana,Arial,Helvetica}
493 BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
494 H1 {font-family: Verdana,Arial,Helvetica}
495 H2 {font-family: Verdana,Arial,Helvetica}
496 H3 {font-family: Verdana,Arial,Helvetica}
497 A:link, A:visited, A:active { text-decoration: underline }
498 </style>
499   </xsl:template>
500 <!--
501  - Write the title box on top
502  -->
503   <xsl:template name="titlebox">
504     <xsl:param name="title" select="'Main Page'"/>
505     <table border="0" width="100%" cellpadding="5" cellspacing="0" align="center">
506     <tr>
507     <td width="180">
508     <a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo"/></a>
509     <a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo"/></a>
510     <a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo"/></a>
511     <div align="left">
512     <a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo"/></a>
513     </div>
514     </td>
515     <td>
516     <table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000">
517       <tr>
518         <td>
519           <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd">
520             <tr>
521               <td align="center">
522                 <xsl:element name="h1">
523                   <xsl:value-of select="$globaltitle"/>
524                 </xsl:element>
525                 <xsl:element name="h2">
526                   <xsl:value-of select="$title"/>
527                 </xsl:element>
528               </td>
529             </tr>
530           </table>
531         </td>
532       </tr>
533     </table>
534     </td>
535     </tr>
536     </table>
537   </xsl:template>
538 <!--
539  - Handling of nodes in the body before the first H2, table of content
540  - Everything is just copied over, except href which may get rewritten
541  - and h1/h2/a at the top level
542  -->
543   <xsl:template priority="2" mode="subcontent" match="a">
544     <xsl:variable name="filename">
545       <xsl:call-template name="filename">
546         <xsl:with-param name="name" select="string(@href)"/>
547       </xsl:call-template>
548     </xsl:variable>
549     <xsl:copy>
550       <xsl:attribute name="href">
551         <xsl:value-of select="$filename"/>
552       </xsl:attribute>
553       <xsl:apply-templates mode="subcontent" select="node()"/>
554     </xsl:copy>
555   </xsl:template>
556   <xsl:template mode="subcontent" match="@*|node()">
557     <xsl:copy>
558       <xsl:apply-templates mode="subcontent" select="@*|node()"/>
559     </xsl:copy>
560   </xsl:template>
561   <xsl:template mode="content" match="@*|node()">
562     <xsl:if test="name() != 'h1' and name() != 'h2'">
563       <xsl:copy>
564         <xsl:apply-templates mode="subcontent" select="@*|node()"/>
565       </xsl:copy>
566     </xsl:if>
567   </xsl:template>
568 <!--
569  - Handling of nodes in the body after an H2
570  - Open a new file and dump all the siblings up to the next H2
571  -->
572   <xsl:template name="subfile">
573     <xsl:param name="header" select="following-sibling::h2[1]"/>
574     <xsl:variable name="filename">
575       <xsl:call-template name="filename">
576         <xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
577       </xsl:call-template>
578     </xsl:variable>
579     <xsl:variable name="tocfilename">
580       <xsl:call-template name="tocfilename">
581         <xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
582       </xsl:call-template>
583     </xsl:variable>
584     <xsl:variable name="title">
585       <xsl:value-of select="$header"/>
586     </xsl:variable>
587     <xsl:document href="{$filename}" method="xml" encoding="ISO-8859-1"
588       doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
589       doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
590       <html>
591         <head>
592           <xsl:call-template name="style"/>
593           <xsl:element name="title">
594             <xsl:value-of select="$title"/>
595           </xsl:element>
596         </head>
597         <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
598           <xsl:call-template name="titlebox">
599             <xsl:with-param name="title" select="$title"/>
600           </xsl:call-template>
601           <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
602             <tr>
603               <td bgcolor="#8b7765">
604                 <table border="0" cellspacing="0" cellpadding="2" width="100%">
605                   <tr>
606                     <td valign="top" width="200" bgcolor="#8b7765">
607                       <xsl:choose>
608                         <xsl:when test="$filename = 'docs.html'">
609                           <xsl:call-template name="develtoc"/>
610                         </xsl:when>
611                         <xsl:when test="$tocfilename = ''">
612                           <xsl:call-template name="develtoc"/>
613                         </xsl:when>
614                         <xsl:otherwise>
615                           <xsl:call-template name="toc"/>
616                         </xsl:otherwise>
617                       </xsl:choose>
618                     </td>
619                     <td valign="top" bgcolor="#8b7765">
620                       <table border="0" cellspacing="0" cellpadding="1" width="100%">
621                         <tr>
622                           <td>
623                             <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
624                               <tr>
625                                 <td>
626                                   <table border="0" cellpadding="3" cellspacing="1" width="100%">
627                                     <tr>
628                                       <td bgcolor="#fffacd">
629                                         <xsl:apply-templates mode="subfile" select="$header/following-sibling::*[preceding-sibling::h2[1] = $header         and name() != 'h2' ]"/>
630                                         <p><a href="bugs.html">Daniel Veillard</a></p>
631                                       </td>
632                                     </tr>
633                                   </table>
634                                 </td>
635                               </tr>
636                             </table>
637                           </td>
638                         </tr>
639                       </table>
640                     </td>
641                   </tr>
642                 </table>
643               </td>
644             </tr>
645           </table>
646         </body>
647       </html>
648     </xsl:document>
649   </xsl:template>
650   <xsl:template mode="subfile" match="@*|node()">
651     <xsl:copy>
652       <xsl:apply-templates mode="content" select="@*|node()"/>
653     </xsl:copy>
654   </xsl:template>
655 <!--
656  - Handling of the initial body and head HTML document
657  -->
658   <xsl:template match="body">
659     <xsl:variable name="firsth2" select="./h2[1]"/>
660     <xsl:variable name="rest2" select="./h2[position()&gt;1]"/>
661     <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
662       <xsl:call-template name="titlebox">
663         <xsl:with-param name="title" select="'libxml'"/>
664       </xsl:call-template>
665       <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
666         <tr>
667           <td bgcolor="#8b7765">
668             <table border="0" cellspacing="0" cellpadding="2" width="100%">
669               <tr>
670                 <td valign="top" width="200" bgcolor="#8b7765">
671                   <xsl:call-template name="toc"/>
672                 </td>
673                 <td valign="top" bgcolor="#8b7765">
674                   <table border="0" cellspacing="0" cellpadding="1" width="100%">
675                     <tr>
676                       <td>
677                         <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
678                           <tr>
679                             <td>
680                               <table border="0" cellpadding="3" cellspacing="1" width="100%">
681                                 <tr>
682                                   <td bgcolor="#fffacd">
683                                     <xsl:apply-templates mode="content" select="($firsth2/preceding-sibling::*)"/>
684                                     <xsl:for-each select="./h2">
685                                       <xsl:call-template name="subfile">
686                                         <xsl:with-param name="header" select="."/>
687                                       </xsl:call-template>
688                                     </xsl:for-each>
689                                     <p><a href="bugs.html">Daniel Veillard</a></p>
690                                   </td>
691                                 </tr>
692                               </table>
693                             </td>
694                           </tr>
695                         </table>
696                       </td>
697                     </tr>
698                   </table>
699                 </td>
700               </tr>
701             </table>
702           </td>
703         </tr>
704       </table>
705     </body>
706   </xsl:template>
707   <xsl:template match="head">
708     <head>
709       <xsl:call-template name="style"/>
710       <xsl:apply-templates mode="head"/>
711     </head>
712   </xsl:template>
713   <xsl:template match="html">
714     <xsl:message>Generating the Web pages</xsl:message>
715     <html>
716       <xsl:apply-templates/>
717     </html>
718   </xsl:template>
719 </xsl:stylesheet>