2
<!DOCTYPE xsl:stylesheet [
4
<!ENTITY nbsp " ">
7
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10
<xsl:param name="shade.verbatim" select="1"/>
11
<xsl:param name="use.id.as.filename" select="1"/>
12
<xsl:param name="chunk.fast" select="1"/>
13
<xsl:param name="chunker.output.encoding" select="'utf-8'"/>
15
<xsl:attribute-set name="shade.verbatim.style">
16
<xsl:attribute name="border">0</xsl:attribute>
17
<xsl:attribute name="bgcolor">#E0E0E0</xsl:attribute>
18
<xsl:attribute name="width">100%</xsl:attribute>
21
<xsl:param name="linenumbering.extension" select="1"/>
22
<xsl:param name="variablelist.as.table" select="1"/>
24
<xsl:template match="blockquote">
25
<div class="{local-name(.)}">
26
<xsl:if test="@lang or @xml:lang">
27
<xsl:call-template name="language.attribute"/>
29
<xsl:call-template name="anchor"/>
32
<xsl:when test="attribution">
33
<table border="0" width="100%"
34
cellspacing="0" cellpadding="0" class="blockquote"
35
summary="Block quote">
37
<td width="10%" valign="top"> </td>
38
<td width="80%" valign="top">
39
<xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
41
<td width="10%" valign="top"> </td>
44
<td colspan="2" align="right" valign="top">
45
<xsl:text>--</xsl:text>
46
<xsl:apply-templates select="attribution"/>
48
<td width="10%" valign="top"> </td>
52
<xsl:when test="@role = 'properties' or @role = 'prototypes'">
54
<xsl:when test="$shade.verbatim != 0">
55
<table width="100%" xsl:use-attribute-sets="shade.verbatim.style">
58
<xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
64
<table width="100%" border="0">
67
<xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
75
<blockquote class="{local-name(.)}">
76
<xsl:apply-templates/>
83
<!-- support for Python language for synopsises -->
84
<xsl:template match="classsynopsis
89
<xsl:param name="language">
91
<xsl:when test="@language">
92
<xsl:value-of select="@language"/>
95
<xsl:value-of select="$default-classsynopsis-language"/>
100
<xsl:when test="$language='python'">
101
<xsl:apply-templates select="." mode="python"/>
109
<xsl:template match="classsynopsis" mode="python">
110
<table bgcolor="#D0E0F0" width="100%">
112
<pre class="{name(.)}">
113
<xsl:text>class </xsl:text>
114
<xsl:apply-templates select="ooclass[1]" mode="python"/>
115
<xsl:if test="ooclass[position() > 1]">
116
<xsl:text>(</xsl:text>
117
<xsl:apply-templates select="ooclass[position() > 1]" mode="python"/> <xsl:text>)</xsl:text>
119
<xsl:text>:&RE;</xsl:text>
121
<xsl:apply-templates select="constructorsynopsis
125
|classsynopsisinfo" mode="python"/>
126
</pre></td></tr></table>
129
<xsl:template match="classsynopsisinfo" mode="python">
130
<xsl:apply-templates mode="python"/>
133
<xsl:template match="ooclass|oointerface|ooexception" mode="python">
134
<xsl:if test="position() > 1">
135
<xsl:text>, </xsl:text>
137
<span class="{name(.)}">
138
<xsl:apply-templates mode="python"/>
142
<xsl:template match="modifier" mode="python">
143
<span class="{name(.)}">
144
<xsl:apply-templates mode="python"/>
145
<xsl:text> </xsl:text>
149
<xsl:template match="classname" mode="python">
150
<xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
151
<xsl:text>, </xsl:text>
153
<span class="{name(.)}">
154
<xsl:apply-templates mode="python"/>
158
<xsl:template match="interfacename" mode="python">
159
<xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
160
<xsl:text>, </xsl:text>
162
<span class="{name(.)}">
163
<xsl:apply-templates mode="python"/>
167
<xsl:template match="exceptionname" mode="python">
168
<xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
169
<xsl:text>, </xsl:text>
171
<span class="{name(.)}">
172
<xsl:apply-templates mode="python"/>
176
<xsl:template match="fieldsynopsis" mode="python">
177
<code class="{name(.)}">
178
<xsl:text> </xsl:text>
179
<xsl:apply-templates mode="python"/>
181
<xsl:call-template name="synop-break"/>
184
<xsl:template match="type" mode="python">
185
<span class="{name(.)}">
186
<xsl:apply-templates mode="python"/>
187
<xsl:text> </xsl:text>
191
<xsl:template match="varname" mode="python">
192
<span class="{name(.)}">
193
<xsl:apply-templates mode="python"/>
194
<xsl:text> </xsl:text>
198
<xsl:template match="initializer" mode="python">
199
<span class="{name(.)}">
200
<xsl:text>=</xsl:text>
201
<xsl:apply-templates mode="python"/>
205
<xsl:template match="void" mode="python">
206
<span class="{name(.)}">
207
<xsl:text>void </xsl:text>
211
<xsl:template match="methodname" mode="python">
212
<span class="{name(.)}">
213
<xsl:apply-templates mode="python"/>
217
<xsl:template match="methodparam" mode="python">
218
<xsl:if test="position() > 1">
219
<xsl:text>, </xsl:text>
221
<span class="{name(.)}">
222
<xsl:apply-templates mode="python"/>
226
<xsl:template mode="python"
227
match="destructorsynopsis|methodsynopsis">
229
<code class="{name(.)}">
230
<xsl:text> def </xsl:text>
231
<xsl:apply-templates select="methodname" mode="python"/>
232
<xsl:text>(</xsl:text>
233
<xsl:apply-templates select="methodparam" mode="python"/>
234
<xsl:text>)</xsl:text>
236
<xsl:call-template name="synop-break"/>
239
<xsl:template mode="python"
240
match="constructorsynopsis">
242
<code class="{name(.)}">
243
<xsl:text> </xsl:text>
244
<xsl:apply-templates select="methodname" mode="python"/>
245
<xsl:text>(</xsl:text>
246
<xsl:apply-templates select="methodparam" mode="python"/>
247
<xsl:text>)</xsl:text>
249
<xsl:call-template name="synop-break"/>
252
<!-- this was the original parameter python mode styling
253
<xsl:template match="parameter" mode="python">
254
<span class="{name(.)}">
255
<xsl:apply-templates mode="python"/>
261
<xsl:template match="link" mode="python">
262
<xsl:apply-templates select="."/>
265
<!-- ========================================================= -->
266
<!-- template to output gtkdoclink elements for the unknown targets -->
268
<xsl:template match="link">
270
<xsl:when test="id(@linkend)">
274
<PYGTKDOCLINK HREF="{@linkend}">
275
<xsl:apply-templates/>
281
<xsl:template match="parameter" mode="python">
282
<span class="{name(.)}">
284
<xsl:when test="@role = 'keyword'">
285
<xsl:call-template name="inline.boldmonoseq"/>
288
<xsl:call-template name="inline.italicmonoseq"/>
294
<xsl:template match="variablelist">
295
<table border="0" width="100%" bgcolor="#FFECCE">
296
<col align="left" valign="top" width="0*">
299
<xsl:apply-templates select="varlistentry" mode="varlist-table"/>