blob: ca8d10476ee49f6f6741bb463da94610c7b0b422 [file] [log] [blame]
Daniel Veillard3bf65be2002-01-23 12:36:34 +00001<?xml version="1.0"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:exsl="http://exslt.org/common"
5 extension-element-prefixes="exsl"
6 exclude-result-prefixes="exsl">
7
8 <!-- Import the resto of the site stylesheets -->
9 <xsl:import href="site.xsl"/>
10
11 <xsl:variable name="apirefs" select="document('libxml2-refs.xml')"/>
12 <xsl:variable name="module" select="$apirefs/apirefs/@name"/>
13 <xsl:key name="refhref" match="reference" use="@name"/>
14
15 <xsl:template match="ref" mode="anchor">
16 <xsl:variable name="name" select="@name"/>
17 <xsl:for-each select="document('libxml2-refs.xml')">
18 <a href="{key('refhref', $name)/@href}"><xsl:value-of select="$name"/></a>
19 </xsl:for-each>
20 </xsl:template>
21 <xsl:template match="type" mode="reflist">
22 <h2>Type <xsl:value-of select="@name"/>:</h2>
23 <p>
24 <xsl:for-each select="ref">
25 <xsl:apply-templates mode="anchor" select="."/>
26 <xsl:text>
27</xsl:text>
28 </xsl:for-each>
29 </p>
30 </xsl:template>
31 <xsl:template match="letter" mode="reflist">
32 <h2>Letter <xsl:value-of select="@name"/>:</h2>
33 <p>
34 <xsl:for-each select="ref">
35 <xsl:apply-templates mode="anchor" select="."/>
36 <xsl:text>
37</xsl:text>
38 </xsl:for-each>
39 </p>
40 </xsl:template>
41 <xsl:template match="file" mode="reflist">
42 <h2>Module <xsl:value-of select="@name"/>:</h2>
43 <p>
44 <xsl:for-each select="ref">
45 <xsl:apply-templates mode="anchor" select="."/>
46 <xsl:text>
47</xsl:text>
48 </xsl:for-each>
49 </p>
50 </xsl:template>
51
52 <xsl:template match="constructors">
53 <xsl:message>Generating API Constructors</xsl:message>
54 <xsl:variable name="title">List of constructors for <xsl:value-of select="$module"/></xsl:variable>
55 <xsl:document href="APIconstructors.html" method="html" version="4.01" encoding="ISO-8859-1">
56 <html>
57 <head>
58 <xsl:call-template name="style"/>
59 <xsl:element name="title">
60 <xsl:value-of select="$title"/>
61 </xsl:element>
62 </head>
63 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
64 <xsl:call-template name="titlebox">
65 <xsl:with-param name="title" select="$title"/>
66 </xsl:call-template>
67 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
68 <tr>
69 <td bgcolor="#8b7765">
70 <table border="0" cellspacing="0" cellpadding="2" width="100%">
71 <tr>
72 <td valign="top" width="200" bgcolor="#8b7765">
73 <xsl:call-template name="toc"/>
74 </td>
75 <td valign="top" bgcolor="#8b7765">
76 <table border="0" cellspacing="0" cellpadding="1" width="100%">
77 <tr>
78 <td>
79 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
80 <tr>
81 <td>
82 <table border="0" cellpadding="3" cellspacing="1" width="100%">
83 <tr>
84 <td bgcolor="#fffacd">
85 <xsl:apply-templates mode="reflist" select="type"/>
86 <p><a href="mailto:daniel@veillard.com">Daniel Veillard</a></p>
87 </td>
88 </tr>
89 </table>
90 </td>
91 </tr>
92 </table>
93 </td>
94 </tr>
95 </table>
96 </td>
97 </tr>
98 </table>
99 </td>
100 </tr>
101 </table>
102 </body>
103 </html>
104 </xsl:document>
105 </xsl:template>
106 <xsl:template match="files">
107 <xsl:message>Generating API List of synbols per file</xsl:message>
108 <xsl:variable name="title">List of Symbols per Module for <xsl:value-of select="$module"/></xsl:variable>
109 <xsl:document href="APIfiles.html" method="html" version="4.01" encoding="ISO-8859-1">
110 <html>
111 <head>
112 <xsl:call-template name="style"/>
113 <xsl:element name="title">
114 <xsl:value-of select="$title"/>
115 </xsl:element>
116 </head>
117 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
118 <xsl:call-template name="titlebox">
119 <xsl:with-param name="title" select="$title"/>
120 </xsl:call-template>
121 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
122 <tr>
123 <td bgcolor="#8b7765">
124 <table border="0" cellspacing="0" cellpadding="2" width="100%">
125 <tr>
126 <td valign="top" width="200" bgcolor="#8b7765">
127 <xsl:call-template name="toc"/>
128 </td>
129 <td valign="top" bgcolor="#8b7765">
130 <table border="0" cellspacing="0" cellpadding="1" width="100%">
131 <tr>
132 <td>
133 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
134 <tr>
135 <td>
136 <table border="0" cellpadding="3" cellspacing="1" width="100%">
137 <tr>
138 <td bgcolor="#fffacd">
139 <xsl:apply-templates mode="reflist" select="file"/>
140 <p><a href="mailto:daniel@veillard.com">Daniel Veillard</a></p>
141 </td>
142 </tr>
143 </table>
144 </td>
145 </tr>
146 </table>
147 </td>
148 </tr>
149 </table>
150 </td>
151 </tr>
152 </table>
153 </td>
154 </tr>
155 </table>
156 </body>
157 </html>
158 </xsl:document>
159 </xsl:template>
160 <xsl:template match="functions">
161 <xsl:message>Generating API Functions by Type</xsl:message>
162 <xsl:variable name="title">List of function manipulating types in <xsl:value-of select="$module"/></xsl:variable>
163 <xsl:document href="APIfunctions.html" method="html" version="4.01" encoding="ISO-8859-1">
164 <html>
165 <head>
166 <xsl:call-template name="style"/>
167 <xsl:element name="title">
168 <xsl:value-of select="$title"/>
169 </xsl:element>
170 </head>
171 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
172 <xsl:call-template name="titlebox">
173 <xsl:with-param name="title" select="$title"/>
174 </xsl:call-template>
175 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
176 <tr>
177 <td bgcolor="#8b7765">
178 <table border="0" cellspacing="0" cellpadding="2" width="100%">
179 <tr>
180 <td valign="top" width="200" bgcolor="#8b7765">
181 <xsl:call-template name="toc"/>
182 </td>
183 <td valign="top" bgcolor="#8b7765">
184 <table border="0" cellspacing="0" cellpadding="1" width="100%">
185 <tr>
186 <td>
187 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
188 <tr>
189 <td>
190 <table border="0" cellpadding="3" cellspacing="1" width="100%">
191 <tr>
192 <td bgcolor="#fffacd">
193 <xsl:apply-templates mode="reflist" select="type"/>
194 <p><a href="mailto:daniel@veillard.com">Daniel Veillard</a></p>
195 </td>
196 </tr>
197 </table>
198 </td>
199 </tr>
200 </table>
201 </td>
202 </tr>
203 </table>
204 </td>
205 </tr>
206 </table>
207 </td>
208 </tr>
209 </table>
210 </body>
211 </html>
212 </xsl:document>
213 </xsl:template>
214 <xsl:template match="alpha">
215 <xsl:message>Generating API Alphabetic list</xsl:message>
216 <xsl:variable name="title">Alphabetic List of Symbols in <xsl:value-of select="$module"/></xsl:variable>
217 <xsl:document href="APIsymbols.html" method="html" version="4.01" encoding="ISO-8859-1">
218 <html>
219 <head>
220 <xsl:call-template name="style"/>
221 <xsl:element name="title">
222 <xsl:value-of select="$title"/>
223 </xsl:element>
224 </head>
225 <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
226 <xsl:call-template name="titlebox">
227 <xsl:with-param name="title" select="$title"/>
228 </xsl:call-template>
229 <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
230 <tr>
231 <td bgcolor="#8b7765">
232 <table border="0" cellspacing="0" cellpadding="2" width="100%">
233 <tr>
234 <td valign="top" width="200" bgcolor="#8b7765">
235 <xsl:call-template name="toc"/>
236 </td>
237 <td valign="top" bgcolor="#8b7765">
238 <table border="0" cellspacing="0" cellpadding="1" width="100%">
239 <tr>
240 <td>
241 <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
242 <tr>
243 <td>
244 <table border="0" cellpadding="3" cellspacing="1" width="100%">
245 <tr>
246 <td bgcolor="#fffacd">
247 <xsl:apply-templates mode="reflist" select="letter"/>
248 <p><a href="mailto:daniel@veillard.com">Daniel Veillard</a></p>
249 </td>
250 </tr>
251 </table>
252 </td>
253 </tr>
254 </table>
255 </td>
256 </tr>
257 </table>
258 </td>
259 </tr>
260 </table>
261 </td>
262 </tr>
263 </table>
264 </body>
265 </html>
266 </xsl:document>
267 </xsl:template>
268 <xsl:template match="apirefs">
269 <xsl:message>Generating API Cross References</xsl:message>
270 <xsl:apply-templates select="constructors"/>
271 <xsl:apply-templates select="functions"/>
272 <xsl:apply-templates select="alpha"/>
273 <xsl:apply-templates select="files"/>
274 </xsl:template>
275
276 <xsl:template match="/">
277 <xsl:apply-templates select="$apirefs/apirefs"/>
278 </xsl:template>
279
280</xsl:stylesheet>