blob: f92332c4b486c4ff916234985cff2a4c201a9032 [file] [log] [blame]
Daniel Veillardc72f9fd2003-11-16 23:59:52 +00001<?xml version="1.0"?>
2<!--
3 Stylesheet to generate the HTML documentation from an XML API descriptions:
4 xsltproc newapi.xsl libxml2-api.xml
5
6 Daniel Veillard
7-->
8<xsl:stylesheet version="1.0"
9 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10 xmlns:exsl="http://exslt.org/common"
Daniel Veillard0b3d9b82003-11-17 11:51:30 +000011 xmlns:str="http://exslt.org/strings"
12 extension-element-prefixes="exsl str"
13 exclude-result-prefixes="exsl str">
Daniel Veillardc72f9fd2003-11-16 23:59:52 +000014
Daniel Veillard0b3d9b82003-11-17 11:51:30 +000015 <!-- Import the main part of the site stylesheets -->
Daniel Veillardc72f9fd2003-11-16 23:59:52 +000016 <xsl:import href="site.xsl"/>
17
18 <!-- Generate XHTML-1.0 transitional -->
19 <xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
20 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
21 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
22
23 <!-- Build keys for all symbols -->
24 <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
25
Daniel Veillard2925c0a2003-11-17 13:58:17 +000026 <!-- the target directory for the HTML output -->
27 <xsl:variable name="htmldir">html</xsl:variable>
Daniel Veillarde8ba84e2003-11-18 13:54:15 +000028 <xsl:variable name="href_base">../</xsl:variable>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +000029
Daniel Veillarde8ba84e2003-11-18 13:54:15 +000030 <!-- The table of content for the HTML API pages -->
31 <xsl:variable name="menu_name">API Menu</xsl:variable>
32 <xsl:variable name="apitoc">
33 <form action="../search.php"
34 enctype="application/x-www-form-urlencoded" method="get">
35 <input name="query" type="text" size="20" value=""/>
36 <input name="submit" type="submit" value="Search ..."/>
37 </form>
38 <ul><!-- style="margin-left: -1em" -->
39 <li><a style="font-weight:bold"
40 href="{$href_base}index.html">Main Menu</a></li>
41 <li><a style="font-weight:bold"
42 href="{$href_base}docs.html">Developer Menu</a></li>
43 <li><a style="font-weight:bold"
44 href="{$href_base}examples/index.html">Code Examples</a></li>
45 <li><a style="font-weight:bold"
Daniel Veillardbe586972003-11-18 20:56:51 +000046 href="index.html">API Menu</a></li>
Daniel Veillarde8ba84e2003-11-18 13:54:15 +000047 <li><a href="libxml-parser.html">Parser API</a></li>
48 <li><a href="libxml-tree.html">Tree API</a></li>
49 <li><a href="libxml-xmlreader.html">Reader API</a></li>
50 <li><a href="{$href_base}guidelines.html">XML Guidelines</a></li>
51 </ul>
52 </xsl:variable>
53 <xsl:template name="apitoc">
54 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
55 <tr>
56 <td>
57 <table width="100%" border="0" cellspacing="1" cellpadding="3">
58 <tr>
59 <td colspan="1" bgcolor="#eecfa1" align="center">
60 <center>
61 <b><xsl:value-of select="$menu_name"/></b>
62 </center>
63 </td>
64 </tr>
65 <tr>
66 <td bgcolor="#fffacd">
67 <xsl:copy-of select="$apitoc"/>
68 </td>
69 </tr>
70 </table>
71 <table width="100%" border="0" cellspacing="1" cellpadding="3">
72 <tr>
73 <td colspan="1" bgcolor="#eecfa1" align="center">
74 <center>
75 <b>API Indexes</b>
76 </center>
77 </td>
78 </tr>
79 <tr>
80 <td bgcolor="#fffacd">
81 <xsl:copy-of select="$api"/>
82 </td>
83 </tr>
84 </table>
85 <table width="100%" border="0" cellspacing="1" cellpadding="3">
86 <tr>
87 <td colspan="1" bgcolor="#eecfa1" align="center">
88 <center>
89 <b>Related links</b>
90 </center>
91 </td>
92 </tr>
93 <tr>
94 <td bgcolor="#fffacd">
95 <xsl:copy-of select="$related"/>
96 </td>
97 </tr>
98 </table>
99 </td>
100 </tr>
101 </table>
102 </xsl:template>
103
104 <xsl:template name="docstyle">
105 <style type="text/css">
Daniel Veillardbe586972003-11-18 20:56:51 +0000106 div.deprecated pre.programlisting {border-style: double;border-color:red}
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000107 pre.programlisting {border-style: double}
108 </style>
109 </xsl:template>
Daniel Veillardbff06bf2003-11-17 16:58:05 +0000110 <xsl:template name="navbar">
111 <xsl:variable name="previous" select="preceding-sibling::file[1]"/>
112 <xsl:variable name="next" select="following-sibling::file[1]"/>
113 <table class="navigation" width="100%" summary="Navigation header"
114 cellpadding="2" cellspacing="2">
115 <tr valign="middle">
116 <xsl:if test="$previous">
117 <td><a accesskey="p" href="libxml-{$previous/@name}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td>
118 <th align="left"><a href="libxml-{$previous/@name}.html"><xsl:value-of select="$previous/@name"/></a></th>
119 </xsl:if>
120 <td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td>
121 <th align="left"><a href="index.html">API documentation</a></th>
122 <td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td>
123 <th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th>
124 <xsl:if test="$next">
125 <th align="right"><a href="libxml-{$next/@name}.html"><xsl:value-of select="$next/@name"/></a></th>
126 <td><a accesskey="n" href="libxml-{$next/@name}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td>
127 </xsl:if>
128 </tr>
129 </table>
130 </xsl:template>
131
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000132 <!-- This is convoluted but needed to force the current document to
133 be the API one and not the result tree from the tokenize() result,
134 because the keys are only defined on the main document -->
135 <xsl:template mode="dumptoken" match='*'>
136 <xsl:param name="token"/>
137 <xsl:variable name="ref" select="key('symbols', $token)"/>
138 <xsl:choose>
139 <xsl:when test="$ref">
140 <a href="libxml-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
141 </xsl:when>
142 <xsl:otherwise>
143 <xsl:value-of select="$token"/>
144 </xsl:otherwise>
145 </xsl:choose>
146 </xsl:template>
147
148 <!-- dumps a string, making cross-reference links -->
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000149 <xsl:template name="dumptext">
150 <xsl:param name="text"/>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000151 <xsl:variable name="ctxt" select='.'/>
152 <!-- <xsl:value-of select="$text"/> -->
153 <xsl:for-each select="str:tokenize($text, ' &#9;')">
154 <xsl:apply-templates select="$ctxt" mode='dumptoken'>
155 <xsl:with-param name="token" select="string(.)"/>
156 </xsl:apply-templates>
157 <xsl:if test="position() != last()">
158 <xsl:text> </xsl:text>
159 </xsl:if>
160 </xsl:for-each>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000161 </xsl:template>
162
163 <xsl:template match="macro" mode="toc">
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000164 <pre class="programlisting">
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000165 <xsl:text>#define </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a><xsl:text>
166
167</xsl:text>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000168 </pre>
169 </xsl:template>
170
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000171 <xsl:template match="variable" mode="toc">
172 <pre class="programlisting">
173 <xsl:text>Variable </xsl:text>
174 <xsl:call-template name="dumptext">
175 <xsl:with-param name="text" select="string(@type)"/>
176 </xsl:call-template>
177 <xsl:text> </xsl:text>
178 <a name="{@name}"></a>
179 <xsl:value-of select="@name"/>
180 <xsl:text>
181
182</xsl:text>
183 </pre>
184 </xsl:template>
185
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000186 <xsl:template match="typedef" mode="toc">
187 <xsl:variable name="name" select="string(@name)"/>
188 <pre class="programlisting">
189 <xsl:choose>
190 <xsl:when test="@type = 'enum'">
191 <xsl:text>Enum </xsl:text>
192 <a name="{$name}"><xsl:value-of select="$name"/></a>
193 <xsl:text> {
194</xsl:text>
195 <xsl:for-each select="/api/symbols/enum[@type = $name]">
196 <xsl:sort select="@value" data-type="number" order="ascending"/>
197 <xsl:text> </xsl:text>
198 <a name="{@name}"><xsl:value-of select="@name"/></a>
199 <xsl:text> = </xsl:text>
200 <xsl:value-of select="@value"/>
201 <xsl:if test="@info != ''">
202 <xsl:text> : </xsl:text>
203 <xsl:call-template name="dumptext">
204 <xsl:with-param name="text" select="@info"/>
205 </xsl:call-template>
206 </xsl:if>
207 <xsl:text>
208</xsl:text>
209 </xsl:for-each>
210 <xsl:text>}
211
212</xsl:text>
213 </xsl:when>
214 <xsl:otherwise>
215 <xsl:text>Typedef </xsl:text>
216 <xsl:call-template name="dumptext">
217 <xsl:with-param name="text" select="@type"/>
218 </xsl:call-template>
219 <xsl:text> </xsl:text>
220 <a name="{$name}"><xsl:value-of select="$name"/></a>
221 <xsl:text>
222
223</xsl:text>
224 </xsl:otherwise>
225 </xsl:choose>
226 </pre>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000227 </xsl:template>
228
229 <xsl:template match="struct" mode="toc">
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000230 <pre class="programlisting">
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000231 <xsl:text>Structure </xsl:text><a name="{@name}"><xsl:value-of select="@name"/></a><br/>
232 <xsl:value-of select="@type"/><xsl:text> {
233</xsl:text>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000234 <xsl:if test="not(field)">
235 <xsl:text>The content of this structure is not made public by the API.
236</xsl:text>
237 </xsl:if>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000238 <xsl:for-each select="field">
239 <xsl:text> </xsl:text>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000240 <xsl:call-template name="dumptext">
241 <xsl:with-param name="text" select="@type"/>
242 </xsl:call-template>
243 <xsl:text>&#9;</xsl:text>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000244 <xsl:value-of select="@name"/>
245 <xsl:if test="@info != ''">
246 <xsl:text>&#9;: </xsl:text>
247 <xsl:call-template name="dumptext">
Daniel Veillardbe586972003-11-18 20:56:51 +0000248 <xsl:with-param name="text" select="substring(@info, 1, 40)"/>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000249 </xsl:call-template>
250 </xsl:if>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000251 <xsl:text>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000252</xsl:text>
253 </xsl:for-each>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000254 <xsl:text>}</xsl:text>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000255 </pre>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000256 <br/>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000257 </xsl:template>
258
259 <xsl:template match="macro">
260 <xsl:variable name="name" select="string(@name)"/>
261 <h3><a name="{$name}"></a>Macro: <xsl:value-of select="$name"/></h3>
262 <pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre>
263 <p>
264 <xsl:call-template name="dumptext">
265 <xsl:with-param name="text" select="info"/>
266 </xsl:call-template>
267 </p><xsl:text>
268</xsl:text>
269 </xsl:template>
270
271 <xsl:template match="function" mode="toc">
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000272 <pre class="programlisting">
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000273 <xsl:call-template name="dumptext">
274 <xsl:with-param name="text" select="return/@type"/>
275 </xsl:call-template>
276 <xsl:text>&#9;</xsl:text>
277 <a href="#{@name}"><xsl:value-of select="@name"/></a>
278 <xsl:text>&#9;(</xsl:text>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000279 <xsl:if test="not(arg)">
280 <xsl:text>void</xsl:text>
281 </xsl:if>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000282 <xsl:for-each select="arg">
283 <xsl:call-template name="dumptext">
284 <xsl:with-param name="text" select="@type"/>
285 </xsl:call-template>
286 <xsl:text> </xsl:text>
287 <xsl:value-of select="@name"/>
288 <xsl:if test="position() != last()">
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000289 <xsl:text>, </xsl:text><br/><xsl:text>&#9;&#9;&#9;&#9; </xsl:text>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000290 </xsl:if>
291 </xsl:for-each>
292 <xsl:text>)</xsl:text><br/>
293 <xsl:text>
294</xsl:text>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000295 </pre>
296 </xsl:template>
297
298 <xsl:template match="functype" mode="toc">
299 <pre class="programlisting">
300 <xsl:variable name="name" select="string(@name)"/>
301 <a name="{$name}"></a>
302 <xsl:text>Function type: </xsl:text>
303 <xsl:value-of select="$name"/>
304 <xsl:text>
305</xsl:text>
306 <xsl:call-template name="dumptext">
307 <xsl:with-param name="text" select="return/@type"/>
308 </xsl:call-template>
309 <xsl:text>&#9;</xsl:text>
310 <xsl:value-of select="@name"/>
311 <xsl:text>&#9;(</xsl:text>
312 <xsl:if test="not(arg)">
313 <xsl:text>void</xsl:text>
314 </xsl:if>
315 <xsl:for-each select="arg">
316 <xsl:call-template name="dumptext">
317 <xsl:with-param name="text" select="@type"/>
318 </xsl:call-template>
319 <xsl:text> </xsl:text>
320 <xsl:value-of select="@name"/>
321 <xsl:if test="position() != last()">
322 <xsl:text>, </xsl:text><br/><xsl:text>&#9;&#9;&#9;&#9; </xsl:text>
323 </xsl:if>
324 </xsl:for-each>
325 <xsl:text>)
326</xsl:text>
327 </pre>
328 <p>
329 <xsl:call-template name="dumptext">
330 <xsl:with-param name="text" select="info"/>
331 </xsl:call-template>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000332 </p>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000333 <xsl:if test="arg | return">
334 <div class="variablelist"><table border="0"><col align="left"/><tbody>
335 <xsl:for-each select="arg">
336 <tr>
337 <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000338 <td>
339 <xsl:call-template name="dumptext">
340 <xsl:with-param name="text" select="@info"/>
341 </xsl:call-template>
342 </td>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000343 </tr>
344 </xsl:for-each>
345 <xsl:if test="return/@info">
346 <tr>
347 <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000348 <td>
349 <xsl:call-template name="dumptext">
350 <xsl:with-param name="text" select="return/@info"/>
351 </xsl:call-template>
352 </td>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000353 </tr>
354 </xsl:if>
355 </tbody></table></div>
356 </xsl:if>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000357 <br/>
358 <xsl:text>
359</xsl:text>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000360 </xsl:template>
361
362 <xsl:template match="function">
363 <xsl:variable name="name" select="string(@name)"/>
364 <h3><a name="{$name}"></a>Function: <xsl:value-of select="$name"/></h3>
365 <pre class="programlisting">
366 <xsl:call-template name="dumptext">
367 <xsl:with-param name="text" select="return/@type"/>
368 </xsl:call-template>
369 <xsl:text>&#9;</xsl:text>
370 <xsl:value-of select="@name"/>
371 <xsl:text>&#9;(</xsl:text>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000372 <xsl:if test="not(arg)">
373 <xsl:text>void</xsl:text>
374 </xsl:if>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000375 <xsl:for-each select="arg">
376 <xsl:call-template name="dumptext">
377 <xsl:with-param name="text" select="@type"/>
378 </xsl:call-template>
379 <xsl:text> </xsl:text>
380 <xsl:value-of select="@name"/>
381 <xsl:if test="position() != last()">
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000382 <xsl:text>, </xsl:text><br/><xsl:text>&#9;&#9;&#9;&#9; </xsl:text>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000383 </xsl:if>
384 </xsl:for-each>
385 <xsl:text>)</xsl:text><br/>
386 <xsl:text>
387</xsl:text>
388 </pre>
389 <p>
390 <xsl:call-template name="dumptext">
391 <xsl:with-param name="text" select="info"/>
392 </xsl:call-template>
393 </p><xsl:text>
394</xsl:text>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000395 <xsl:if test="arg | return/@info">
396 <div class="variablelist"><table border="0"><col align="left"/><tbody>
397 <xsl:for-each select="arg">
398 <tr>
399 <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000400 <td>
401 <xsl:call-template name="dumptext">
402 <xsl:with-param name="text" select="@info"/>
403 </xsl:call-template>
404 </td>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000405 </tr>
406 </xsl:for-each>
407 <xsl:if test="return/@info">
408 <tr>
409 <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000410 <td>
411 <xsl:call-template name="dumptext">
412 <xsl:with-param name="text" select="return/@info"/>
413 </xsl:call-template>
414 </td>
Daniel Veillard0b3d9b82003-11-17 11:51:30 +0000415 </tr>
416 </xsl:if>
417 </tbody></table></div>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000418 </xsl:if>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000419 </xsl:template>
420
421 <xsl:template match="exports" mode="toc">
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000422 <xsl:apply-templates select="key('symbols', string(@symbol))[1]" mode="toc"/>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000423 </xsl:template>
424
425 <xsl:template match="exports">
Daniel Veillard2925c0a2003-11-17 13:58:17 +0000426 <xsl:apply-templates select="key('symbols', string(@symbol))[1]"/>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000427 </xsl:template>
428
Daniel Veillardbe586972003-11-18 20:56:51 +0000429 <xsl:template name="description">
430 <xsl:if test="deprecated">
431 <h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2>
432 </xsl:if>
433 <xsl:if test="description">
434 <p><xsl:value-of select="description"/></p>
435 </xsl:if>
436 </xsl:template>
437
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000438 <xsl:template match="file">
439 <xsl:variable name="name" select="@name"/>
440 <xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable>
441 <xsl:document href="{$htmldir}/libxml-{$name}.html" method="xml" encoding="ISO-8859-1"
442 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
443 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
444 <html>
445 <head>
446 <xsl:call-template name="style"/>
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000447 <xsl:call-template name="docstyle"/>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000448 <title><xsl:value-of select="$title"/></title>
449 </head>
450 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
451 <xsl:call-template name="titlebox">
452 <xsl:with-param name="title" select="$title"/>
453 </xsl:call-template>
454 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
455 <tr>
456 <td bgcolor="#8b7765">
457 <table border="0" cellspacing="0" cellpadding="2" width="100%">
458 <tr>
459 <td valign="top" width="200" bgcolor="#8b7765">
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000460 <xsl:call-template name="apitoc"/>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000461 </td>
462 <td valign="top" bgcolor="#8b7765">
463 <table border="0" cellspacing="0" cellpadding="1" width="100%">
464 <tr>
465 <td>
466 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
467 <tr>
468 <td>
469 <table border="0" cellpadding="3" cellspacing="1" width="100%">
470 <tr>
471 <td bgcolor="#fffacd">
Daniel Veillardbff06bf2003-11-17 16:58:05 +0000472 <xsl:call-template name="navbar"/>
Daniel Veillardbe586972003-11-18 20:56:51 +0000473 <xsl:call-template name="description"/>
474 <xsl:choose>
475 <xsl:when test="deprecated">
476 <div class="deprecated">
477 <h2>Table of Contents</h2>
478 <xsl:apply-templates select="exports" mode="toc"/>
479 <h2>Description</h2>
480 <xsl:text>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000481</xsl:text>
Daniel Veillardbe586972003-11-18 20:56:51 +0000482 <xsl:apply-templates select="exports"/>
483 </div>
484 </xsl:when>
485 <xsl:otherwise>
486 <h2>Table of Contents</h2>
487 <xsl:apply-templates select="exports" mode="toc"/>
488 <h2>Description</h2>
489 <xsl:text>
490</xsl:text>
491 <xsl:apply-templates select="exports"/>
492 </xsl:otherwise>
493 </xsl:choose>
494 <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000495 </td>
496 </tr>
497 </table>
498 </td>
499 </tr>
500 </table>
501 </td>
502 </tr>
503 </table>
504 </td>
505 </tr>
506 </table>
507 </td>
508 </tr>
509 </table>
510 </body>
511 </html>
512 </xsl:document>
513 </xsl:template>
514
515 <xsl:template match="file" mode="toc">
516 <xsl:variable name="name" select="@name"/>
Daniel Veillardbe586972003-11-18 20:56:51 +0000517 <li>
518 <a href="libxml-{$name}.html"><xsl:value-of select="$name"/></a>
519 <xsl:text>: </xsl:text>
520 <xsl:value-of select="summary"/>
521 </li>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000522 </xsl:template>
523
Daniel Veillardbe586972003-11-18 20:56:51 +0000524 <xsl:template name="mainpage">
525 <xsl:param name="file" select="concat($htmldir, '/index.html')"/>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000526 <xsl:variable name="title">Reference Manual for <xsl:value-of select="/api/@name"/></xsl:variable>
Daniel Veillardbe586972003-11-18 20:56:51 +0000527 <xsl:document href="{$file}" method="xml" encoding="ISO-8859-1"
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000528 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
529 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
530 <html>
531 <head>
532 <xsl:call-template name="style"/>
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000533 <xsl:call-template name="docstyle"/>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000534 <title><xsl:value-of select="$title"/></title>
535 </head>
536 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
537 <xsl:call-template name="titlebox">
538 <xsl:with-param name="title" select="$title"/>
539 </xsl:call-template>
540 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
541 <tr>
542 <td bgcolor="#8b7765">
543 <table border="0" cellspacing="0" cellpadding="2" width="100%">
544 <tr>
545 <td valign="top" width="200" bgcolor="#8b7765">
Daniel Veillarde8ba84e2003-11-18 13:54:15 +0000546 <xsl:call-template name="apitoc"/>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000547 </td>
548 <td valign="top" bgcolor="#8b7765">
549 <table border="0" cellspacing="0" cellpadding="1" width="100%">
550 <tr>
551 <td>
552 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
553 <tr>
554 <td>
555 <table border="0" cellpadding="3" cellspacing="1" width="100%">
556 <tr>
557 <td bgcolor="#fffacd">
558 <h2>Table of Contents</h2>
559 <ul>
560 <xsl:apply-templates select="/api/files/file" mode="toc"/>
561 </ul>
Daniel Veillardbe586972003-11-18 20:56:51 +0000562 <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000563 </td>
564 </tr>
565 </table>
566 </td>
567 </tr>
568 </table>
569 </td>
570 </tr>
571 </table>
572 </td>
573 </tr>
574 </table>
575 </td>
576 </tr>
577 </table>
578 </body>
579 </html>
580 </xsl:document>
Daniel Veillardbe586972003-11-18 20:56:51 +0000581 </xsl:template>
582
583 <xsl:template match="/">
584 <!-- Save the main index.html as well as a couple of copies -->
585 <xsl:call-template name="mainpage"/>
586 <xsl:call-template name="mainpage">
587 <xsl:with-param name="file" select="concat($htmldir, '/book1.html')"/>
588 </xsl:call-template>
589 <xsl:call-template name="mainpage">
590 <xsl:with-param name="file" select="concat($htmldir, '/libxml-lib.html')"/>
591 </xsl:call-template>
Daniel Veillardc72f9fd2003-11-16 23:59:52 +0000592 <!-- now build the file for each of the modules -->
593 <xsl:apply-templates select="/api/files/file"/>
594 </xsl:template>
595
596</xsl:stylesheet>