2
<!-- this stylesheet builds the API*.html , it works based on libxml2-refs.xml
4
<xsl:stylesheet version="1.0"
5
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6
xmlns:exsl="http://exslt.org/common"
7
extension-element-prefixes="exsl"
8
exclude-result-prefixes="exsl">
10
<!-- Import the rest of the site stylesheets -->
11
<xsl:import href="site.xsl"/>
13
<!-- Generate XHTML-1.0 transitional -->
14
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
15
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
16
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
18
<xsl:variable name="href_base" select="''"/>
19
<xsl:variable name="apirefs" select="document('libxml2-refs.xml')"/>
20
<xsl:variable name="module" select="$apirefs/apirefs/@name"/>
21
<xsl:key name="refhref" match="reference" use="@name"/>
23
<xsl:template match="ref" mode="anchor">
24
<xsl:variable name="name" select="@name"/>
25
<xsl:for-each select="document('libxml2-refs.xml')">
26
<a href="{key('refhref', $name)/@href}"><xsl:value-of select="$name"/></a><br/>
29
<xsl:template match="type" mode="reflist">
30
<h2>Type <xsl:value-of select="@name"/>:</h2>
32
<xsl:for-each select="ref">
33
<xsl:apply-templates mode="anchor" select="."/>
39
<xsl:template match="letter" mode="reflist">
40
<h2>Letter <xsl:value-of select="@name"/>:</h2>
42
<xsl:for-each select="ref">
43
<xsl:apply-templates mode="anchor" select="."/>
49
<xsl:template match="file" mode="reflist">
50
<h2><a name="{@name}">Module <xsl:value-of select="@name"/></a>:</h2>
52
<xsl:for-each select="ref">
53
<xsl:apply-templates mode="anchor" select="."/>
59
<xsl:template match="letter" mode="wordlist">
60
<h2>Letter <xsl:value-of select="@name"/>:</h2>
62
<xsl:for-each select="word">
63
<dt><xsl:value-of select="@name"/></dt>
65
<xsl:for-each select="ref">
66
<xsl:apply-templates mode="anchor" select="."/>
75
<xsl:template match="constructors">
76
<xsl:message>Generating API Constructors</xsl:message>
77
<xsl:variable name="title">List of constructors for <xsl:value-of select="$module"/></xsl:variable>
78
<xsl:document href="APIconstructors.html" method="xml" encoding="ISO-8859-1"
79
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
80
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
83
<xsl:call-template name="style"/>
84
<xsl:element name="title">
85
<xsl:value-of select="$title"/>
88
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
89
<xsl:call-template name="titlebox">
90
<xsl:with-param name="title" select="$title"/>
92
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
94
<td bgcolor="#8b7765">
95
<table border="0" cellspacing="0" cellpadding="2" width="100%">
97
<td valign="top" width="200" bgcolor="#8b7765">
98
<xsl:call-template name="develtoc"/>
100
<td valign="top" bgcolor="#8b7765">
101
<table border="0" cellspacing="0" cellpadding="1" width="100%">
104
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
107
<table border="0" cellpadding="3" cellspacing="1" width="100%">
109
<td bgcolor="#fffacd">
110
<xsl:apply-templates mode="reflist" select="type"/>
111
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
131
<xsl:template match="files">
132
<xsl:message>Generating API List of synbols per file</xsl:message>
133
<xsl:variable name="title">List of Symbols per Module for <xsl:value-of select="$module"/></xsl:variable>
134
<xsl:document href="APIfiles.html" method="xml" encoding="ISO-8859-1"
135
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
136
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
139
<xsl:call-template name="style"/>
140
<xsl:element name="title">
141
<xsl:value-of select="$title"/>
144
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
145
<xsl:call-template name="titlebox">
146
<xsl:with-param name="title" select="$title"/>
148
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
150
<td bgcolor="#8b7765">
151
<table border="0" cellspacing="0" cellpadding="2" width="100%">
153
<td valign="top" width="200" bgcolor="#8b7765">
154
<xsl:call-template name="develtoc"/>
156
<td valign="top" bgcolor="#8b7765">
157
<table border="0" cellspacing="0" cellpadding="1" width="100%">
160
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
163
<table border="0" cellpadding="3" cellspacing="1" width="100%">
165
<td bgcolor="#fffacd">
166
<xsl:apply-templates mode="reflist" select="file"/>
167
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
187
<xsl:template match="functions">
188
<xsl:message>Generating API Functions by Type</xsl:message>
189
<xsl:variable name="title">List of function manipulating types in <xsl:value-of select="$module"/></xsl:variable>
190
<xsl:document href="APIfunctions.html" method="xml" encoding="ISO-8859-1"
191
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
192
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
195
<xsl:call-template name="style"/>
196
<xsl:element name="title">
197
<xsl:value-of select="$title"/>
200
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
201
<xsl:call-template name="titlebox">
202
<xsl:with-param name="title" select="$title"/>
204
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
206
<td bgcolor="#8b7765">
207
<table border="0" cellspacing="0" cellpadding="2" width="100%">
209
<td valign="top" width="200" bgcolor="#8b7765">
210
<xsl:call-template name="develtoc"/>
212
<td valign="top" bgcolor="#8b7765">
213
<table border="0" cellspacing="0" cellpadding="1" width="100%">
216
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
219
<table border="0" cellpadding="3" cellspacing="1" width="100%">
221
<td bgcolor="#fffacd">
222
<xsl:apply-templates mode="reflist" select="type"/>
223
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
243
<xsl:template match="alpha">
244
<xsl:message>Generating API Alphabetic list</xsl:message>
245
<xsl:variable name="title">Alphabetic List of Symbols in <xsl:value-of select="$module"/></xsl:variable>
246
<xsl:document href="APIsymbols.html" method="xml" encoding="ISO-8859-1"
247
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
248
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
251
<xsl:call-template name="style"/>
252
<xsl:element name="title">
253
<xsl:value-of select="$title"/>
256
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
257
<xsl:call-template name="titlebox">
258
<xsl:with-param name="title" select="$title"/>
260
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
262
<td bgcolor="#8b7765">
263
<table border="0" cellspacing="0" cellpadding="2" width="100%">
265
<td valign="top" width="200" bgcolor="#8b7765">
266
<xsl:call-template name="develtoc"/>
268
<td valign="top" bgcolor="#8b7765">
269
<table border="0" cellspacing="0" cellpadding="1" width="100%">
272
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
275
<table border="0" cellpadding="3" cellspacing="1" width="100%">
277
<td bgcolor="#fffacd">
278
<xsl:apply-templates mode="reflist" select="letter"/>
279
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
299
<xsl:template name="apichunks">
301
<xsl:for-each select="/apirefs/index/chunks/chunk">
302
<xsl:variable name="name" select="@name"/>
303
<xsl:variable name="start" select="@start"/>
304
<xsl:variable name="end" select="@end"/>
305
<xsl:variable name="block" select="concat($start, '-', $end)"/>
306
<a href="API{$name}.html"><xsl:value-of select="$block"/></a>
312
<xsl:template match="chunk">
313
<xsl:variable name="name" select="@name"/>
314
<xsl:variable name="start" select="@start"/>
315
<xsl:variable name="end" select="@end"/>
316
<xsl:variable name="block" select="concat($start, '-', $end)"/>
317
<xsl:variable name="target" select="/apirefs/index/chunk[@name = $name]"/>
318
<xsl:variable name="title">API Alphabetic Index <xsl:value-of select="$block"/> for <xsl:value-of select="$module"/></xsl:variable>
319
<xsl:document href="API{$name}.html" method="xml" encoding="ISO-8859-1"
320
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
321
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
324
<xsl:call-template name="style"/>
325
<xsl:element name="title">
326
<xsl:value-of select="$title"/>
329
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
330
<xsl:call-template name="titlebox">
331
<xsl:with-param name="title" select="$title"/>
333
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
335
<td bgcolor="#8b7765">
336
<table border="0" cellspacing="0" cellpadding="2" width="100%">
338
<td valign="top" width="200" bgcolor="#8b7765">
339
<xsl:call-template name="develtoc"/>
341
<td valign="top" bgcolor="#8b7765">
342
<table border="0" cellspacing="0" cellpadding="1" width="100%">
345
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
348
<table border="0" cellpadding="3" cellspacing="1" width="100%">
350
<td bgcolor="#fffacd">
351
<xsl:call-template name="apichunks"/>
352
<xsl:apply-templates mode="wordlist"
353
select="$target/letter"/>
354
<xsl:call-template name="apichunks"/>
355
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
376
<xsl:template match="index">
377
<xsl:message>Generating API Index</xsl:message>
378
<xsl:apply-templates select="chunks/chunk"/>
381
<xsl:template match="apirefs">
382
<xsl:message>Generating API Cross References</xsl:message>
383
<xsl:apply-templates select="constructors"/>
384
<xsl:apply-templates select="functions"/>
385
<xsl:apply-templates select="alpha"/>
386
<xsl:apply-templates select="files"/>
387
<xsl:apply-templates select="index"/>
390
<xsl:template match="/">
391
<xsl:apply-templates select="$apirefs/apirefs"/>