~network-manager/network-manager/ubuntu.0.7

2752.1.219 by dcbw
add tools directory and xsl for spec generation
1
<!-- Generate HTML documentation from the Telepathy specification.
2
The master copy of this stylesheet is in the Telepathy spec repository -
3
please make any changes there.
4
5
Copyright (C) 2006, 2007 Collabora Limited
6
7
This library is free software; you can redistribute it and/or
8
modify it under the terms of the GNU Lesser General Public
9
License as published by the Free Software Foundation; either
10
version 2.1 of the License, or (at your option) any later version.
11
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public
18
License along with this library; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
-->
21
22
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
23
  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
24
  exclude-result-prefixes="tp">
25
  <!--Don't move the declaration of the HTML namespace up here - XMLNSs
26
  don't work ideally in the presence of two things that want to use the
27
  absence of a prefix, sadly. -->
28
29
  <xsl:template match="*" mode="identity">
30
    <xsl:copy>
31
      <xsl:apply-templates mode="identity"/>
32
    </xsl:copy>
33
  </xsl:template>
34
35
  <xsl:template match="tp:docstring">
36
    <xsl:apply-templates select="node()" mode="identity"/>
37
  </xsl:template>
38
39
  <xsl:template match="tp:errors">
40
    <h1 xmlns="http://www.w3.org/1999/xhtml">Errors:</h1>
41
    <xsl:apply-templates/>
42
  </xsl:template>
43
44
  <xsl:template match="tp:generic-types">
45
    <h1 xmlns="http://www.w3.org/1999/xhtml">Generic types:</h1>
46
    <xsl:call-template name="do-types"/>
47
  </xsl:template>
48
49
  <xsl:template name="do-types">
50
    <xsl:if test="tp:simple-type">
51
      <h2 xmlns="http://www.w3.org/1999/xhtml">Simple types:</h2>
52
      <xsl:apply-templates select="tp:simple-type"/>
53
    </xsl:if>
54
55
    <xsl:if test="tp:enum">
56
      <h2 xmlns="http://www.w3.org/1999/xhtml">Enumerated types:</h2>
57
      <xsl:apply-templates select="tp:enum"/>
58
    </xsl:if>
59
60
    <xsl:if test="tp:flags">
61
      <h2 xmlns="http://www.w3.org/1999/xhtml">Sets of flags:</h2>
62
      <xsl:apply-templates select="tp:flags"/>
63
    </xsl:if>
64
65
    <xsl:if test="tp:struct">
66
      <h2 xmlns="http://www.w3.org/1999/xhtml">Structure types:</h2>
67
      <xsl:apply-templates select="tp:struct"/>
68
    </xsl:if>
69
70
    <xsl:if test="tp:mapping">
71
      <h2 xmlns="http://www.w3.org/1999/xhtml">Mapping types:</h2>
72
      <xsl:apply-templates select="tp:mapping"/>
73
    </xsl:if>
74
75
    <xsl:if test="tp:external-type">
76
      <h2 xmlns="http://www.w3.org/1999/xhtml">Types defined elsewhere:</h2>
77
      <dl><xsl:apply-templates select="tp:external-type"/></dl>
78
    </xsl:if>
79
  </xsl:template>
80
81
  <xsl:template match="tp:error">
82
    <h2 xmlns="http://www.w3.org/1999/xhtml"><a name="{concat(../@namespace, '.', translate(@name, ' ', ''))}"></a><xsl:value-of select="concat(../@namespace, '.', translate(@name, ' ', ''))"/></h2>
83
    <xsl:apply-templates select="tp:docstring"/>
84
  </xsl:template>
85
86
  <xsl:template match="/tp:spec/tp:copyright">
87
    <div xmlns="http://www.w3.org/1999/xhtml">
88
      <xsl:apply-templates/>
89
    </div>
90
  </xsl:template>
91
  <xsl:template match="/tp:spec/tp:license">
92
    <div xmlns="http://www.w3.org/1999/xhtml" class="license">
93
      <xsl:apply-templates mode="identity"/>
94
    </div>
95
  </xsl:template>
96
97
  <xsl:template match="tp:copyright"/>
98
  <xsl:template match="tp:license"/>
99
100
  <xsl:template match="interface">
101
    <h1 xmlns="http://www.w3.org/1999/xhtml"><a name="{@name}"></a><xsl:value-of select="@name"/></h1>
102
103
    <xsl:if test="@tp:causes-havoc">
104
      <p xmlns="http://www.w3.org/1999/xhtml" class="causes-havoc">
105
        This interface is <xsl:value-of select="@tp:causes-havoc"/>
106
        and is likely to cause havoc to your API/ABI if bindings are generated.
107
        Don't include it in libraries that care about compatibility.
108
      </p>
109
    </xsl:if>
110
111
    <xsl:if test="tp:requires">
112
      <p>Implementations of this interface must also implement:</p>
113
      <ul xmlns="http://www.w3.org/1999/xhtml">
114
        <xsl:for-each select="tp:requires">
115
          <li><code><a href="#{@interface}"><xsl:value-of select="@interface"/></a></code></li>
116
        </xsl:for-each>
117
      </ul>
118
    </xsl:if>
119
120
    <xsl:apply-templates select="tp:docstring" />
121
122
    <xsl:choose>
123
      <xsl:when test="method">
124
        <h2 xmlns="http://www.w3.org/1999/xhtml">Methods:</h2>
125
        <xsl:apply-templates select="method"/>
126
      </xsl:when>
127
      <xsl:otherwise>
128
        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no methods.</p>
129
      </xsl:otherwise>
130
    </xsl:choose>
131
132
    <xsl:choose>
133
      <xsl:when test="signal">
134
        <h2 xmlns="http://www.w3.org/1999/xhtml">Signals:</h2>
135
        <xsl:apply-templates select="signal"/>
136
      </xsl:when>
137
      <xsl:otherwise>
138
        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no signals.</p>
139
      </xsl:otherwise>
140
    </xsl:choose>
141
142
    <xsl:choose>
143
      <xsl:when test="property">
144
        <h2 xmlns="http://www.w3.org/1999/xhtml">Properties:</h2>
145
        <dl xmlns="http://www.w3.org/1999/xhtml">
146
          <xsl:apply-templates select="property"/>
147
        </dl>
148
      </xsl:when>
149
      <xsl:otherwise>
150
        <p xmlns="http://www.w3.org/1999/xhtml">Interface has no properties.</p>
151
      </xsl:otherwise>
152
    </xsl:choose>
153
154
    <xsl:call-template name="do-types"/>
155
156
  </xsl:template>
157
158
  <xsl:template match="tp:flags">
159
    <h3>
160
      <a name="type-{@name}">
161
        <xsl:value-of select="@name"/>
162
      </a>
163
    </h3>
164
    <xsl:apply-templates select="tp:docstring" />
165
    <dl xmlns="http://www.w3.org/1999/xhtml">
166
        <xsl:variable name="value-prefix">
167
          <xsl:choose>
168
            <xsl:when test="@value-prefix">
169
              <xsl:value-of select="@value-prefix"/>
170
            </xsl:when>
171
            <xsl:otherwise>
172
              <xsl:value-of select="@name"/>
173
            </xsl:otherwise>
174
          </xsl:choose>
175
        </xsl:variable>
176
      <xsl:for-each select="tp:flag">
177
        <dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
178
        <xsl:choose>
179
          <xsl:when test="tp:docstring">
180
            <dd xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates select="tp:docstring" /></dd>
181
          </xsl:when>
182
          <xsl:otherwise>
183
            <dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
184
          </xsl:otherwise>
185
        </xsl:choose>
186
      </xsl:for-each>
187
    </dl>
188
  </xsl:template>
189
190
  <xsl:template match="tp:enum">
191
    <h3 xmlns="http://www.w3.org/1999/xhtml">
192
      <a name="type-{@name}">
193
        <xsl:value-of select="@name"/>
194
      </a>
195
    </h3>
196
    <xsl:apply-templates select="tp:docstring" />
197
    <dl xmlns="http://www.w3.org/1999/xhtml">
198
        <xsl:variable name="value-prefix">
199
          <xsl:choose>
200
            <xsl:when test="@value-prefix">
201
              <xsl:value-of select="@value-prefix"/>
202
            </xsl:when>
203
            <xsl:otherwise>
204
              <xsl:value-of select="@name"/>
205
            </xsl:otherwise>
206
          </xsl:choose>
207
        </xsl:variable>
208
      <xsl:for-each select="tp:enumvalue">
209
        <dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
210
        <xsl:choose>
211
          <xsl:when test="tp:docstring">
212
            <dd xmlns="http://www.w3.org/1999/xhtml"><xsl:apply-templates select="tp:docstring" /></dd>
213
          </xsl:when>
214
          <xsl:otherwise>
215
            <dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
216
          </xsl:otherwise>
217
        </xsl:choose>
218
      </xsl:for-each>
219
    </dl>
220
  </xsl:template>
221
222
  <xsl:template match="property">
223
    <dt xmlns="http://www.w3.org/1999/xhtml">
224
      <xsl:if test="@name">
225
        <code><xsl:value-of select="@name"/></code> -
226
      </xsl:if>
227
      <code><xsl:value-of select="@type"/></code> -
228
      <code>(<xsl:value-of select="@access"/>)</code>
229
      <xsl:call-template name="parenthesized-tp-type"/>
230
    </dt>
231
    <dd xmlns="http://www.w3.org/1999/xhtml">
232
      <xsl:apply-templates select="tp:docstring"/>
233
    </dd>
234
  </xsl:template>
235
236
  <xsl:template match="tp:mapping">
237
    <div xmlns="http://www.w3.org/1999/xhtml" class="struct">
238
      <h3>
239
        <a name="type-{@name}">
240
          <xsl:value-of select="@name"/>
241
        </a> - a{
242
        <xsl:for-each select="tp:member">
243
          <xsl:value-of select="@type"/>
244
          <xsl:text>: </xsl:text>
245
          <xsl:value-of select="@name"/>
246
          <xsl:if test="position() != last()"> &#x2192; </xsl:if>
247
        </xsl:for-each>
248
        }
249
      </h3>
250
      <div class="docstring">
251
        <xsl:apply-templates select="tp:docstring"/>
252
      </div>
253
      <div>
254
        <h4>Members</h4>
255
        <dl>
256
          <xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
257
        </dl>
258
      </div>
259
    </div>
260
  </xsl:template>
261
262
  <xsl:template match="tp:docstring" mode="in-index"/>
263
264
  <xsl:template match="tp:simple-type | tp:enum | tp:flags | tp:external-type"
265
    mode="in-index">
266
    - <xsl:value-of select="@type"/>
267
  </xsl:template>
268
269
  <xsl:template match="tp:simple-type">
270
    <div xmlns="http://www.w3.org/1999/xhtml" class="simple-type">
271
      <h3>
272
        <a name="type-{@name}">
273
          <xsl:value-of select="@name"/>
274
        </a> - <xsl:value-of select="@type"/>
275
      </h3>
276
      <div class="docstring">
277
        <xsl:apply-templates select="tp:docstring"/>
278
      </div>
279
    </div>
280
  </xsl:template>
281
282
  <xsl:template match="tp:external-type">
283
    <div xmlns="http://www.w3.org/1999/xhtml" class="external-type">
284
      <dt>
285
        <a name="type-{@name}">
286
          <xsl:value-of select="@name"/>
287
        </a> - <xsl:value-of select="@type"/>
288
      </dt>
289
      <dd>Defined by: <xsl:value-of select="@from"/></dd>
290
    </div>
291
  </xsl:template>
292
293
  <xsl:template match="tp:struct" mode="in-index">
294
    - ( <xsl:for-each select="tp:member">
295
          <xsl:value-of select="@type"/>
296
          <xsl:if test="position() != last()">, </xsl:if>
297
        </xsl:for-each> )
298
  </xsl:template>
299
300
  <xsl:template match="tp:mapping" mode="in-index">
301
    - a{ <xsl:for-each select="tp:member">
302
          <xsl:value-of select="@type"/>
303
          <xsl:if test="position() != last()"> &#x2192; </xsl:if>
304
        </xsl:for-each> }
305
  </xsl:template>
306
307
  <xsl:template match="tp:struct">
308
    <div xmlns="http://www.w3.org/1999/xhtml" class="struct">
309
      <h3>
310
        <a name="type-{@name}">
311
          <xsl:value-of select="@name"/>
312
        </a> - (
313
        <xsl:for-each select="tp:member">
314
          <xsl:value-of select="@type"/>
315
          <xsl:text>: </xsl:text>
316
          <xsl:value-of select="@name"/>
317
          <xsl:if test="position() != last()">, </xsl:if>
318
        </xsl:for-each>
319
        )
320
      </h3>
321
      <div class="docstring">
322
        <xsl:apply-templates select="tp:docstring"/>
323
      </div>
324
      <xsl:choose>
325
        <xsl:when test="string(@array-name) != ''">
326
          <p>In bindings that need a separate name, arrays of
327
            <xsl:value-of select="@name"/> should be called
328
            <xsl:value-of select="@array-name"/>.</p>
329
        </xsl:when>
330
        <xsl:otherwise>
331
          <p>Arrays of <xsl:value-of select="@name"/> don't generally
332
            make sense.</p>
333
        </xsl:otherwise>
334
      </xsl:choose>
335
      <div>
336
        <h4>Members</h4>
337
        <dl>
338
          <xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
339
        </dl>
340
      </div>
341
    </div>
342
  </xsl:template>
343
344
  <xsl:template match="method">
345
    <div xmlns="http://www.w3.org/1999/xhtml" class="method">
346
      <h3 xmlns="http://www.w3.org/1999/xhtml">
347
        <a name="{concat(../@name, concat('.', @name))}">
348
          <xsl:value-of select="@name"/>
349
        </a> (
350
        <xsl:for-each xmlns="" select="arg[@direction='in']">
351
          <xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
352
          <xsl:if test="position() != last()">, </xsl:if>
353
        </xsl:for-each>
354
        ) &#x2192;
355
        <xsl:choose>
356
          <xsl:when test="arg[@direction='out']">
357
            <xsl:for-each xmlns="" select="arg[@direction='out']">
358
              <xsl:value-of select="@type"/>
359
              <xsl:if test="position() != last()">, </xsl:if>
360
            </xsl:for-each>
361
          </xsl:when>
362
          <xsl:otherwise>nothing</xsl:otherwise>
363
        </xsl:choose>
364
      </h3>
365
      <div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
366
        <xsl:apply-templates select="tp:docstring" />
367
      </div>
368
369
      <xsl:if test="arg[@direction='in']">
370
        <div xmlns="http://www.w3.org/1999/xhtml">
371
          <h4>Parameters</h4>
372
          <dl xmlns="http://www.w3.org/1999/xhtml">
373
            <xsl:apply-templates select="arg[@direction='in']"
374
              mode="parameters-in-docstring"/>
375
          </dl>
376
        </div>
377
      </xsl:if>
378
379
      <xsl:if test="arg[@direction='out']">
380
        <div xmlns="http://www.w3.org/1999/xhtml">
381
          <h4>Returns</h4>
382
          <dl xmlns="http://www.w3.org/1999/xhtml">
383
            <xsl:apply-templates select="arg[@direction='out']"
384
              mode="returns-in-docstring"/>
385
          </dl>
386
        </div>
387
      </xsl:if>
388
389
      <xsl:if test="tp:possible-errors">
390
        <div xmlns="http://www.w3.org/1999/xhtml">
391
          <h4>Possible errors</h4>
392
          <dl xmlns="http://www.w3.org/1999/xhtml">
393
            <xsl:apply-templates select="tp:possible-errors/tp:error"/>
394
          </dl>
395
        </div>
396
      </xsl:if>
397
398
    </div>
399
  </xsl:template>
400
401
  <xsl:template name="parenthesized-tp-type">
402
    <xsl:if test="@tp:type">
403
      <xsl:variable name="tp-type" select="@tp:type"/>
404
      <xsl:variable name="single-type">
405
        <xsl:choose>
406
          <xsl:when test="contains($tp-type, '[]')">
407
            <xsl:value-of select="substring-before($tp-type, '[]')"/>
408
          </xsl:when>
409
          <xsl:otherwise>
410
            <xsl:value-of select="$tp-type"/>
411
          </xsl:otherwise>
412
        </xsl:choose>
413
      </xsl:variable>
414
      <xsl:choose>
415
        <xsl:when test="//tp:simple-type[@name=$tp-type]" />
416
        <xsl:when test="//tp:simple-type[concat(@name, '[]')=$tp-type]" />
417
        <xsl:when test="//tp:struct[concat(@name, '[]')=$tp-type][string(@array-name) != '']" />
418
        <xsl:when test="//tp:struct[@name=$tp-type]" />
419
        <xsl:when test="//tp:enum[@name=$tp-type]" />
420
        <xsl:when test="//tp:enum[concat(@name, '[]')=$tp-type]" />
421
        <xsl:when test="//tp:flags[@name=$tp-type]" />
422
        <xsl:when test="//tp:flags[concat(@name, '[]')=$tp-type]" />
423
        <xsl:when test="//tp:mapping[@name=$tp-type]" />
424
        <xsl:when test="//tp:external-type[concat(@name, '[]')=$tp-type]" />
425
        <xsl:when test="//tp:external-type[@name=$tp-type]" />
426
        <xsl:otherwise>
427
          <xsl:message terminate="yes">
428
            <xsl:text>ERR: Unable to find type '</xsl:text>
429
            <xsl:value-of select="$tp-type"/>
430
            <xsl:text>'&#10;</xsl:text>
431
          </xsl:message>
432
        </xsl:otherwise>
433
      </xsl:choose>
434
      (<a href="#type-{$single-type}"><xsl:value-of select="$tp-type"/></a>)
435
    </xsl:if>
436
  </xsl:template>
437
438
  <xsl:template match="tp:member" mode="members-in-docstring">
439
    <dt xmlns="http://www.w3.org/1999/xhtml">
440
      <code><xsl:value-of select="@name"/></code> -
441
      <code><xsl:value-of select="@type"/></code>
442
      <xsl:call-template name="parenthesized-tp-type"/>
443
    </dt>
444
    <dd xmlns="http://www.w3.org/1999/xhtml">
445
      <xsl:choose>
446
        <xsl:when test="tp:docstring">
447
          <xsl:apply-templates select="tp:docstring" />
448
        </xsl:when>
449
        <xsl:otherwise>
450
          <em>(undocumented)</em>
451
        </xsl:otherwise>
452
      </xsl:choose>
453
    </dd>
454
  </xsl:template>
455
456
  <xsl:template match="arg" mode="parameters-in-docstring">
457
    <dt xmlns="http://www.w3.org/1999/xhtml">
458
      <code><xsl:value-of select="@name"/></code> -
459
      <code><xsl:value-of select="@type"/></code>
460
      <xsl:call-template name="parenthesized-tp-type"/>
461
    </dt>
462
    <dd xmlns="http://www.w3.org/1999/xhtml">
463
      <xsl:apply-templates select="tp:docstring" />
464
    </dd>
465
  </xsl:template>
466
467
  <xsl:template match="arg" mode="returns-in-docstring">
468
    <dt xmlns="http://www.w3.org/1999/xhtml">
469
      <xsl:if test="@name">
470
        <code><xsl:value-of select="@name"/></code> -
471
      </xsl:if>
472
      <code><xsl:value-of select="@type"/></code>
473
      <xsl:call-template name="parenthesized-tp-type"/>
474
    </dt>
475
    <dd xmlns="http://www.w3.org/1999/xhtml">
476
      <xsl:apply-templates select="tp:docstring"/>
477
    </dd>
478
  </xsl:template>
479
480
  <xsl:template match="tp:possible-errors/tp:error">
481
    <dt xmlns="http://www.w3.org/1999/xhtml">
482
      <code><xsl:value-of select="@name"/></code>
483
    </dt>
484
    <dd xmlns="http://www.w3.org/1999/xhtml">
485
        <xsl:variable name="name" select="@name"/>
486
        <xsl:choose>
487
          <xsl:when test="tp:docstring">
488
            <xsl:apply-templates select="tp:docstring"/>
489
          </xsl:when>
490
          <xsl:when test="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring">
491
            <xsl:apply-templates select="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring"/> <em xmlns="http://www.w3.org/1999/xhtml">(generic description)</em>
492
          </xsl:when>
493
          <xsl:otherwise>
494
            (Undocumented.)
495
          </xsl:otherwise>
496
        </xsl:choose>
497
    </dd>
498
  </xsl:template>
499
500
  <xsl:template match="signal">
501
    <div xmlns="http://www.w3.org/1999/xhtml" class="signal">
502
      <h3 xmlns="http://www.w3.org/1999/xhtml">
503
        <a name="{concat(../@name, concat('.', @name))}">
504
          <xsl:value-of select="@name"/>
505
        </a> (
506
        <xsl:for-each xmlns="" select="arg">
507
          <xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
508
          <xsl:if test="position() != last()">, </xsl:if>
509
        </xsl:for-each>
510
        )</h3>
511
      <div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
512
        <xsl:apply-templates select="tp:docstring"/>
513
      </div>
514
515
      <xsl:if test="arg">
516
        <div xmlns="http://www.w3.org/1999/xhtml">
517
          <h4>Parameters</h4>
518
          <dl xmlns="http://www.w3.org/1999/xhtml">
519
            <xsl:apply-templates select="arg" mode="parameters-in-docstring"/>
520
          </dl>
521
        </div>
522
      </xsl:if>
523
    </div>
524
  </xsl:template>
525
526
  <xsl:output method="xml" indent="no" encoding="ascii"
527
    omit-xml-declaration="yes"
528
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
529
    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
530
531
  <xsl:template match="/tp:spec">
532
    <html xmlns="http://www.w3.org/1999/xhtml">
533
      <head>
534
        <title>
535
          <xsl:value-of select="tp:title"/>
536
          <xsl:if test="tp:version">
537
            <xsl:text> version </xsl:text>
538
            <xsl:value-of select="tp:version"/>
539
          </xsl:if>
540
        </title>
541
        <style type="text/css">
542
543
          body {
544
            font-family: sans-serif;
545
            margin: 2em;
546
            height: 100%;
547
            font-size: 1.2em;
548
          }
549
          h1 {
550
            padding-top: 5px;
551
            padding-bottom: 5px;
552
            font-size: 1.6em;
553
            background: #dadae2;
554
          }
555
          h2 {
556
            font-size: 1.3em;
557
          }
558
          h3 {
559
            font-size: 1.2em;
560
          }
561
          a:link, a:visited, a:link:hover, a:visited:hover {
562
            font-weight: bold;
563
          }
564
          .topbox {
565
            padding-top: 10px;
566
            padding-left: 10px;
567
            border-bottom: black solid 1px;
568
            padding-bottom: 10px;
569
            background: #dadae2;
570
            font-size: 2em;
571
            font-weight: bold;
572
            color: #5c5c5c;
573
          }
574
          .topnavbox {
575
            padding-left: 10px;
576
            padding-top: 5px;
577
            padding-bottom: 5px;
578
            background: #abacba;
579
            border-bottom: black solid 1px;
580
            font-size: 1.2em;
581
          }
582
          .topnavbox a{
583
            color: black;
584
            font-weight: normal;
585
          }
586
          .sidebar {
587
            float: left;
588
            /* width:9em;
589
            border-right:#abacba solid 1px;
590
            border-left: #abacba solid 1px;
591
            height:100%; */
592
            border: #abacba solid 1px;
593
            padding-left: 10px;
594
            margin-left: 10px;
595
            padding-right: 10px;
596
            margin-right: 10px;
597
            color: #5d5d5d;
598
            background: #dadae2;
599
          }
600
          .sidebar a {
601
            text-decoration: none;
602
            border-bottom: #e29625 dotted 1px;
603
            color: #e29625;
604
            font-weight: normal;
605
          }
606
          .sidebar h1 {
607
            font-size: 1.2em;
608
            color: black;
609
          }
610
          .sidebar ul {
611
            padding-left: 25px;
612
            padding-bottom: 10px;
613
            border-bottom: #abacba solid 1px;
614
          }
615
          .sidebar li {
616
            padding-top: 2px;
617
            padding-bottom: 2px;
618
          }
619
          .sidebar h2 {
620
            font-style:italic;
621
            font-size: 0.81em;
622
            padding-left: 5px;
623
            padding-right: 5px;
624
            font-weight: normal;
625
          }
626
          .date {
627
            font-size: 0.6em;
628
            float: right;
629
            font-style: italic;
630
          }
631
          .method {
632
            margin-left: 1em;
633
            margin-right: 4em;
634
          }
635
          .signal {
636
            margin-left: 1em;
637
            margin-right: 4em;
638
          }
639
640
        </style>
641
      </head>
642
      <body>
643
        <h1 class="topbox">
644
          <xsl:value-of select="tp:title" />
645
        </h1>
646
        <xsl:if test="tp:version">
647
          <h2>Version <xsl:apply-templates select="tp:version"/></h2>
648
        </xsl:if>
649
        <xsl:apply-templates select="tp:copyright"/>
650
        <xsl:apply-templates select="tp:license"/>
651
        <xsl:apply-templates select="tp:docstring"/>
652
653
        <h2>Interfaces</h2>
654
        <ul>
655
        <xsl:for-each select="node/interface">
656
            <li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
657
          </xsl:for-each>
658
        </ul>
659
660
        <xsl:apply-templates select="node"/>
661
        <xsl:apply-templates select="tp:generic-types"/>
662
        <xsl:apply-templates select="tp:errors"/>
663
664
        <h1>Index</h1>
665
        <h2>Index of interfaces</h2>
666
        <ul>
667
        <xsl:for-each select="node/interface">
668
            <li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
669
          </xsl:for-each>
670
        </ul>
671
        <h2>Index of types</h2>
672
        <ul>
673
          <xsl:for-each select="//tp:simple-type | //tp:enum | //tp:flags | //tp:mapping | //tp:struct | //tp:external-type">
674
            <xsl:sort select="@name"/>
675
            <li>
676
              <code>
677
                <a href="#type-{@name}">
678
                  <xsl:value-of select="@name"/>
679
                </a>
680
              </code>
681
              <xsl:apply-templates mode="in-index" select="."/>
682
            </li>
683
          </xsl:for-each>
684
        </ul>
685
      </body>
686
    </html>
687
  </xsl:template>
688
689
</xsl:stylesheet>
690
691
<!-- vim:set sw=2 sts=2 et: -->