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