1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
|
<!-- Generate HTML documentation from the Telepathy specification.
The master copy of this stylesheet is in the Telepathy spec repository -
please make any changes there.
Copyright (C) 2006-2008 Collabora Limited
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
xmlns:html="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="tp html">
<!--Don't move the declaration of the HTML namespace up here — XMLNSs
don't work ideally in the presence of two things that want to use the
absence of a prefix, sadly. -->
<xsl:param name="allow-undefined-interfaces" select="false()"/>
<xsl:template match="html:* | @*" mode="html">
<xsl:copy>
<xsl:apply-templates mode="html"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tp:type" mode="html">
<xsl:call-template name="tp-type">
<xsl:with-param name="tp-type" select="string(.)"/>
</xsl:call-template>
</xsl:template>
<!-- tp:dbus-ref: reference a D-Bus interface, signal, method or property -->
<xsl:template match="tp:dbus-ref" mode="html">
<xsl:variable name="name">
<xsl:choose>
<xsl:when test="@namespace">
<xsl:value-of select="@namespace"/>
<xsl:text>.</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:value-of select="string(.)"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="//interface[@name=$name]
or //interface/method[concat(../@name, '.', @name)=$name]
or //interface/signal[concat(../@name, '.', @name)=$name]
or //interface/property[concat(../@name, '.', @name)=$name]
or //interface[@name=concat($name, '.DRAFT')]
or //interface/method[
concat(../@name, '.', @name)=concat($name, '.DRAFT')]
or //interface/signal[
concat(../@name, '.', @name)=concat($name, '.DRAFT')]
or //interface/property[
concat(../@name, '.', @name)=concat($name, '.DRAFT')]
">
<a xmlns="http://www.w3.org/1999/xhtml" href="#{$name}">
<xsl:value-of select="string(.)"/>
</a>
</xsl:when>
<xsl:when test="$allow-undefined-interfaces">
<span xmlns="http://www.w3.org/1999/xhtml" title="defined elsewhere">
<xsl:value-of select="string(.)"/>
</span>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>ERR: cannot find D-Bus interface, method, </xsl:text>
<xsl:text>signal or property called '</xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>' </xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- tp:member-ref: reference a property of the current interface -->
<xsl:template match="tp:member-ref" mode="html">
<xsl:variable name="prefix" select="concat(ancestor::interface/@name,
'.')"/>
<xsl:variable name="name" select="string(.)"/>
<xsl:if test="not(ancestor::interface)">
<xsl:message terminate="yes">
<xsl:text>ERR: Cannot use tp:member-ref when not in an</xsl:text>
<xsl:text> <interface> </xsl:text>
</xsl:message>
</xsl:if>
<xsl:choose>
<xsl:when test="ancestor::interface/signal[@name=$name]"/>
<xsl:when test="ancestor::interface/method[@name=$name]"/>
<xsl:when test="ancestor::interface/property[@name=$name]"/>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>ERR: interface </xsl:text>
<xsl:value-of select="ancestor::interface/@name"/>
<xsl:text> has no signal/method/property called </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
<a xmlns="http://www.w3.org/1999/xhtml" href="#{$prefix}{$name}">
<xsl:value-of select="$name"/>
</a>
</xsl:template>
<xsl:template match="*" mode="identity">
<xsl:copy>
<xsl:apply-templates mode="identity"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tp:docstring">
<xsl:apply-templates mode="html"/>
</xsl:template>
<xsl:template match="tp:added">
<p class="added" xmlns="http://www.w3.org/1999/xhtml">Added in
version <xsl:value-of select="@version"/>.
<xsl:apply-templates select="node()" mode="html"/></p>
</xsl:template>
<xsl:template match="tp:changed">
<xsl:choose>
<xsl:when test="node()">
<p class="changed" xmlns="http://www.w3.org/1999/xhtml">Changed in
version <xsl:value-of select="@version"/>:
<xsl:apply-templates select="node()" mode="html"/></p>
</xsl:when>
<xsl:otherwise>
<p class="changed">Changed in version
<xsl:value-of select="@version"/></p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tp:deprecated">
<p class="deprecated" xmlns="http://www.w3.org/1999/xhtml">Deprecated
since version <xsl:value-of select="@version"/>.
<xsl:apply-templates select="node()" mode="html"/></p>
</xsl:template>
<xsl:template match="tp:rationale" mode="html">
<div xmlns="http://www.w3.org/1999/xhtml" class="rationale">
<xsl:apply-templates select="node()" mode="html"/>
</div>
</xsl:template>
<xsl:template match="tp:errors">
<h1 xmlns="http://www.w3.org/1999/xhtml">Errors</h1>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="tp:generic-types">
<h1 xmlns="http://www.w3.org/1999/xhtml">Generic types</h1>
<xsl:call-template name="do-types"/>
</xsl:template>
<xsl:template name="do-types">
<xsl:if test="tp:simple-type">
<h2 xmlns="http://www.w3.org/1999/xhtml">Simple types</h2>
<xsl:apply-templates select="tp:simple-type"/>
</xsl:if>
<xsl:if test="tp:enum">
<h2 xmlns="http://www.w3.org/1999/xhtml">Enumerated types:</h2>
<xsl:apply-templates select="tp:enum"/>
</xsl:if>
<xsl:if test="tp:flags">
<h2 xmlns="http://www.w3.org/1999/xhtml">Sets of flags:</h2>
<xsl:apply-templates select="tp:flags"/>
</xsl:if>
<xsl:if test="tp:struct">
<h2 xmlns="http://www.w3.org/1999/xhtml">Structure types</h2>
<xsl:apply-templates select="tp:struct"/>
</xsl:if>
<xsl:if test="tp:mapping">
<h2 xmlns="http://www.w3.org/1999/xhtml">Mapping types</h2>
<xsl:apply-templates select="tp:mapping"/>
</xsl:if>
<xsl:if test="tp:external-type">
<h2 xmlns="http://www.w3.org/1999/xhtml">Types defined elsewhere</h2>
<dl><xsl:apply-templates select="tp:external-type"/></dl>
</xsl:if>
</xsl:template>
<xsl:template match="tp:error">
<h2 xmlns="http://www.w3.org/1999/xhtml"><a name="{concat(../@namespace, '.', translate(@name, ' ', ''))}"></a><xsl:value-of select="concat(../@namespace, '.', translate(@name, ' ', ''))"/></h2>
<xsl:apply-templates select="tp:docstring"/>
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</xsl:template>
<xsl:template match="/tp:spec/tp:copyright">
<div xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates mode="text"/>
</div>
</xsl:template>
<xsl:template match="/tp:spec/tp:license">
<div xmlns="http://www.w3.org/1999/xhtml" class="license">
<xsl:apply-templates mode="html"/>
</div>
</xsl:template>
<xsl:template match="tp:copyright"/>
<xsl:template match="tp:license"/>
<xsl:template match="interface">
<h1 xmlns="http://www.w3.org/1999/xhtml"><a name="{@name}"></a><xsl:value-of select="@name"/></h1>
<xsl:if test="@tp:causes-havoc">
<p xmlns="http://www.w3.org/1999/xhtml" class="causes-havoc">
This interface is <xsl:value-of select="@tp:causes-havoc"/>
and is likely to cause havoc to your API/ABI if bindings are generated.
Don't include it in libraries that care about compatibility.
</p>
</xsl:if>
<xsl:if test="tp:requires">
<p>Implementations of this interface must also implement:</p>
<ul xmlns="http://www.w3.org/1999/xhtml">
<xsl:for-each select="tp:requires">
<li><code><a href="#{@interface}"><xsl:value-of select="@interface"/></a></code></li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:apply-templates select="tp:docstring" />
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
<xsl:choose>
<xsl:when test="method">
<h2 xmlns="http://www.w3.org/1999/xhtml">Methods:</h2>
<xsl:apply-templates select="method"/>
</xsl:when>
<xsl:otherwise>
<p xmlns="http://www.w3.org/1999/xhtml">Interface has no methods.</p>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="signal">
<h2 xmlns="http://www.w3.org/1999/xhtml">Signals:</h2>
<xsl:apply-templates select="signal"/>
</xsl:when>
<xsl:otherwise>
<p xmlns="http://www.w3.org/1999/xhtml">Interface has no signals.</p>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="tp:property">
<h2 xmlns="http://www.w3.org/1999/xhtml">Telepathy Properties:</h2>
<p xmlns="http://www.w3.org/1999/xhtml">Accessed using the
<a href="#org.freedesktop.Telepathy.Properties">Telepathy
Properties</a> interface.</p>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:property"/>
</dl>
</xsl:when>
<xsl:otherwise>
<p xmlns="http://www.w3.org/1999/xhtml">Interface has no Telepathy
properties.</p>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="property">
<h2 xmlns="http://www.w3.org/1999/xhtml">D-Bus core Properties:</h2>
<p xmlns="http://www.w3.org/1999/xhtml">Accessed using the
org.freedesktop.DBus.Properties interface.</p>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="property"/>
</dl>
</xsl:when>
<xsl:otherwise>
<p xmlns="http://www.w3.org/1999/xhtml">Interface has no D-Bus core
properties.</p>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="do-types"/>
</xsl:template>
<xsl:template match="tp:flags">
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @name on a tp:flags type </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@type) or @type = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @type on tp:flags type</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
<h3>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a>
</h3>
<xsl:apply-templates select="tp:docstring" />
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:variable name="value-prefix">
<xsl:choose>
<xsl:when test="@value-prefix">
<xsl:value-of select="@value-prefix"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select="tp:flag">
<dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
<xsl:choose>
<xsl:when test="tp:docstring">
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring" />
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</dd>
</xsl:when>
<xsl:otherwise>
<dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</dl>
</xsl:template>
<xsl:template match="tp:enum">
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @name on a tp:enum type </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@type) or @type = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @type on tp:enum type</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
<h3 xmlns="http://www.w3.org/1999/xhtml">
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a>
</h3>
<xsl:apply-templates select="tp:docstring" />
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:variable name="value-prefix">
<xsl:choose>
<xsl:when test="@value-prefix">
<xsl:value-of select="@value-prefix"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each select="tp:enumvalue">
<dt xmlns="http://www.w3.org/1999/xhtml"><code><xsl:value-of select="concat($value-prefix, '_', @suffix)"/> = <xsl:value-of select="@value"/></code></dt>
<xsl:choose>
<xsl:when test="tp:docstring">
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring" />
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</dd>
</xsl:when>
<xsl:otherwise>
<dd xmlns="http://www.w3.org/1999/xhtml">(Undocumented)</dd>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</dl>
</xsl:template>
<xsl:template name="binding-name-check">
<xsl:if test="not(@tp:name-for-bindings)">
<xsl:message terminate="yes">
<xsl:text>ERR: Binding name missing from </xsl:text>
<xsl:value-of select="parent::interface/@name"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="translate(@tp:name-for-bindings, '_', '') != @name">
<xsl:message terminate="yes">
<xsl:text>ERR: Binding name </xsl:text>
<xsl:value-of select="@tp:name-for-bindings"/>
<xsl:text> doesn't correspond to D-Bus name </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
</xsl:template>
<xsl:template match="property">
<xsl:call-template name="binding-name-check"/>
<xsl:if test="not(parent::interface)">
<xsl:message terminate="yes">
<xsl:text>ERR: property </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> does not have an interface as parent </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @name on a property of </xsl:text>
<xsl:value-of select="../@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@type) or @type = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @type on property </xsl:text>
<xsl:value-of select="concat(../@name, '.', @name)"/>
<xsl:text>: '</xsl:text>
<xsl:value-of select="@access"/>
<xsl:text>' </xsl:text>
</xsl:message>
</xsl:if>
<dt xmlns="http://www.w3.org/1999/xhtml">
<a name="{concat(../@name, '.', @name)}">
<code><xsl:value-of select="@name"/></code>
</a>
<xsl:text> − </xsl:text>
<code><xsl:value-of select="@type"/></code>
<xsl:call-template name="parenthesized-tp-type"/>
<xsl:text>, </xsl:text>
<xsl:choose>
<xsl:when test="@access = 'read'">
<xsl:text>read-only</xsl:text>
</xsl:when>
<xsl:when test="@access = 'write'">
<xsl:text>write-only</xsl:text>
</xsl:when>
<xsl:when test="@access = 'readwrite'">
<xsl:text>read/write</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>ERR: unknown or missing value for </xsl:text>
<xsl:text>@access on property </xsl:text>
<xsl:value-of select="concat(../@name, '.', @name)"/>
<xsl:text>: '</xsl:text>
<xsl:value-of select="@access"/>
<xsl:text>' </xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring"/>
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</dd>
</xsl:template>
<xsl:template match="tp:property">
<dt xmlns="http://www.w3.org/1999/xhtml">
<xsl:if test="@name">
<code><xsl:value-of select="@name"/></code> −
</xsl:if>
<code><xsl:value-of select="@type"/></code>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring"/>
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</dd>
</xsl:template>
<xsl:template match="tp:mapping">
<div xmlns="http://www.w3.org/1999/xhtml" class="struct">
<h3>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a> − a{
<xsl:for-each select="tp:member">
<xsl:value-of select="@type"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()"> → </xsl:if>
</xsl:for-each>
}
</h3>
<div class="docstring">
<xsl:apply-templates select="tp:docstring"/>
<xsl:if test="string(@array-name) != ''">
<p>In bindings that need a separate name, arrays of
<xsl:value-of select="@name"/> should be called
<xsl:value-of select="@array-name"/>.</p>
</xsl:if>
</div>
<div>
<h4>Members</h4>
<dl>
<xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
</dl>
</div>
</div>
</xsl:template>
<xsl:template match="tp:docstring" mode="in-index"/>
<xsl:template match="tp:simple-type | tp:enum | tp:flags | tp:external-type"
mode="in-index">
− <xsl:value-of select="@type"/>
</xsl:template>
<xsl:template match="tp:simple-type">
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @name on a tp:simple-type </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@type) or @type = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @type on tp:simple-type</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
<div xmlns="http://www.w3.org/1999/xhtml" class="simple-type">
<h3>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a> − <xsl:value-of select="@type"/>
</h3>
<div class="docstring">
<xsl:apply-templates select="tp:docstring"/>
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</div>
</div>
</xsl:template>
<xsl:template match="tp:external-type">
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @name on a tp:external-type </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@type) or @type = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @type on tp:external-type</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
<div xmlns="http://www.w3.org/1999/xhtml" class="external-type">
<dt>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a> − <xsl:value-of select="@type"/>
</dt>
<dd>Defined by: <xsl:value-of select="@from"/></dd>
</div>
</xsl:template>
<xsl:template match="tp:struct" mode="in-index">
− ( <xsl:for-each select="tp:member">
<xsl:value-of select="@type"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each> )
</xsl:template>
<xsl:template match="tp:mapping" mode="in-index">
− a{ <xsl:for-each select="tp:member">
<xsl:value-of select="@type"/>
<xsl:if test="position() != last()"> → </xsl:if>
</xsl:for-each> }
</xsl:template>
<xsl:template match="tp:struct">
<div xmlns="http://www.w3.org/1999/xhtml" class="struct">
<h3>
<a name="type-{@name}">
<xsl:value-of select="@name"/>
</a> − (
<xsl:for-each select="tp:member">
<xsl:value-of select="@type"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
)
</h3>
<div class="docstring">
<xsl:apply-templates select="tp:docstring"/>
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</div>
<xsl:choose>
<xsl:when test="string(@array-name) != ''">
<p>In bindings that need a separate name, arrays of
<xsl:value-of select="@name"/> should be called
<xsl:value-of select="@array-name"/>.</p>
</xsl:when>
<xsl:otherwise>
<p>Arrays of <xsl:value-of select="@name"/> don't generally
make sense.</p>
</xsl:otherwise>
</xsl:choose>
<div>
<h4>Members</h4>
<dl>
<xsl:apply-templates select="tp:member" mode="members-in-docstring"/>
</dl>
</div>
</div>
</xsl:template>
<xsl:template match="method">
<xsl:call-template name="binding-name-check"/>
<xsl:if test="not(parent::interface)">
<xsl:message terminate="yes">
<xsl:text>ERR: method </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> does not have an interface as parent </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @name on a method of </xsl:text>
<xsl:value-of select="../@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
<xsl:for-each select="arg">
<xsl:if test="not(@type) or @type = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: an arg of method </xsl:text>
<xsl:value-of select="concat(../../@name, '.', ../@name)"/>
<xsl:text> has no type</xsl:text>
</xsl:message>
</xsl:if>
<xsl:choose>
<xsl:when test="@direction='in'">
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: an 'in' arg of method </xsl:text>
<xsl:value-of select="concat(../../@name, '.', ../@name)"/>
<xsl:text> has no name</xsl:text>
</xsl:message>
</xsl:if>
</xsl:when>
<xsl:when test="@direction='out'">
<!-- FIXME: This is commented out until someone with a lot of time
on their hands goes through the spec adding names to all the "out"
arguments
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="no">
<xsl:text>INFO: an 'out' arg of method </xsl:text>
<xsl:value-of select="concat(../../@name, '.', ../@name)"/>
<xsl:text> has no name</xsl:text>
</xsl:message>
</xsl:if>-->
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>ERR: an arg of method </xsl:text>
<xsl:value-of select="concat(../../@name, '.', ../@name)"/>
<xsl:text> has direction neither 'in' nor 'out'</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<div xmlns="http://www.w3.org/1999/xhtml" class="method">
<h3 xmlns="http://www.w3.org/1999/xhtml">
<a name="{concat(../@name, concat('.', @name))}">
<xsl:value-of select="@name"/>
</a> (
<xsl:for-each xmlns="" select="arg[@direction='in']">
<xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
) →
<xsl:choose>
<xsl:when test="arg[@direction='out']">
<xsl:for-each xmlns="" select="arg[@direction='out']">
<xsl:value-of select="@type"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>nothing</xsl:otherwise>
</xsl:choose>
</h3>
<div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
<xsl:apply-templates select="tp:docstring" />
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</div>
<xsl:if test="arg[@direction='in']">
<div xmlns="http://www.w3.org/1999/xhtml">
<h4>Parameters</h4>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="arg[@direction='in']"
mode="parameters-in-docstring"/>
</dl>
</div>
</xsl:if>
<xsl:if test="arg[@direction='out']">
<div xmlns="http://www.w3.org/1999/xhtml">
<h4>Returns</h4>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="arg[@direction='out']"
mode="returns-in-docstring"/>
</dl>
</div>
</xsl:if>
<xsl:if test="tp:possible-errors">
<div xmlns="http://www.w3.org/1999/xhtml">
<h4>Possible errors</h4>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:possible-errors/tp:error"/>
</dl>
</div>
</xsl:if>
</div>
</xsl:template>
<xsl:template name="tp-type">
<xsl:param name="tp-type"/>
<xsl:param name="type"/>
<xsl:variable name="single-type">
<xsl:choose>
<xsl:when test="contains($tp-type, '[]')">
<xsl:value-of select="substring-before($tp-type, '[]')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$tp-type"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="type-of-single-tp-type">
<xsl:choose>
<xsl:when test="//tp:simple-type[@name=$single-type]">
<xsl:value-of select="string(//tp:simple-type[@name=$single-type]/@type)"/>
</xsl:when>
<xsl:when test="//tp:struct[@name=$single-type]">
<xsl:text>(</xsl:text>
<xsl:for-each select="//tp:struct[@name=$single-type]/tp:member">
<xsl:value-of select="@type"/>
</xsl:for-each>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:when test="//tp:enum[@name=$single-type]">
<xsl:value-of select="string(//tp:enum[@name=$single-type]/@type)"/>
</xsl:when>
<xsl:when test="//tp:flags[@name=$single-type]">
<xsl:value-of select="string(//tp:flags[@name=$single-type]/@type)"/>
</xsl:when>
<xsl:when test="//tp:mapping[@name=$single-type]">
<xsl:text>a{</xsl:text>
<xsl:for-each select="//tp:mapping[@name=$single-type]/tp:member">
<xsl:value-of select="@type"/>
</xsl:for-each>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="//tp:external-type[@name=$single-type]">
<xsl:value-of select="string(//tp:external-type[@name=$single-type]/@type)"/>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>ERR: Unable to find type '</xsl:text>
<xsl:value-of select="$tp-type"/>
<xsl:text>' </xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="type-of-tp-type">
<xsl:if test="contains($tp-type, '[]')">
<!-- one 'a', plus one for each [ after the [], and delete all ] -->
<xsl:value-of select="concat('a',
translate(substring-after($tp-type, '[]'), '[]', 'a'))"/>
</xsl:if>
<xsl:value-of select="$type-of-single-tp-type"/>
</xsl:variable>
<xsl:if test="string($type) != '' and
string($type-of-tp-type) != string($type)">
<xsl:message terminate="yes">
<xsl:text>ERR: tp:type '</xsl:text>
<xsl:value-of select="$tp-type"/>
<xsl:text>' has D-Bus type '</xsl:text>
<xsl:value-of select="$type-of-tp-type"/>
<xsl:text>' but has been used with type='</xsl:text>
<xsl:value-of select="$type"/>
<xsl:text>' </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="contains($tp-type, '[]')">
<xsl:call-template name="tp-type-array-usage-check">
<xsl:with-param name="single-type" select="$single-type"/>
<xsl:with-param name="type-of-single-tp-type"
select="$type-of-single-tp-type"/>
</xsl:call-template>
</xsl:if>
<a href="#type-{$single-type}"><xsl:value-of select="$tp-type"/></a>
</xsl:template>
<xsl:template name="tp-type-array-usage-check">
<xsl:param name="single-type"/>
<xsl:param name="type-of-single-tp-type"/>
<xsl:variable name="array-name">
<xsl:choose>
<xsl:when test="//tp:struct[@name=$single-type]">
<xsl:value-of select="//tp:struct[@name=$single-type]/@array-name"/>
</xsl:when>
<xsl:when test="//tp:mapping[@name=$single-type]">
<xsl:value-of select="//tp:mapping[@name=$single-type]/@array-name"/>
</xsl:when>
<xsl:when test="//tp:external-type[@name=$single-type]">
<xsl:value-of select="//tp:external-type[@name=$single-type]/@array-name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="''"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="not(contains('ybnqiuxtdsvog', $type-of-single-tp-type))">
<xsl:if test="not($array-name) or $array-name=''">
<xsl:message terminate="yes">
<xsl:text>No array-name specified for complex type </xsl:text>
<xsl:value-of select="$single-type"/>
<xsl:text>, but array used </xsl:text>
</xsl:message>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template name="parenthesized-tp-type">
<xsl:if test="@tp:type">
<xsl:text> (</xsl:text>
<xsl:call-template name="tp-type">
<xsl:with-param name="tp-type" select="@tp:type"/>
<xsl:with-param name="type" select="@type"/>
</xsl:call-template>
<xsl:text>)</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="tp:member" mode="members-in-docstring">
<dt xmlns="http://www.w3.org/1999/xhtml">
<code><xsl:value-of select="@name"/></code> −
<code><xsl:value-of select="@type"/></code>
<xsl:call-template name="parenthesized-tp-type"/>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:choose>
<xsl:when test="tp:docstring">
<xsl:apply-templates select="tp:docstring" />
</xsl:when>
<xsl:otherwise>
<em>(undocumented)</em>
</xsl:otherwise>
</xsl:choose>
</dd>
</xsl:template>
<xsl:template match="arg" mode="parameters-in-docstring">
<dt xmlns="http://www.w3.org/1999/xhtml">
<code><xsl:value-of select="@name"/></code> −
<code><xsl:value-of select="@type"/></code>
<xsl:call-template name="parenthesized-tp-type"/>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring" />
</dd>
</xsl:template>
<xsl:template match="arg" mode="returns-in-docstring">
<dt xmlns="http://www.w3.org/1999/xhtml">
<xsl:if test="@name">
<code><xsl:value-of select="@name"/></code> −
</xsl:if>
<code><xsl:value-of select="@type"/></code>
<xsl:call-template name="parenthesized-tp-type"/>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="tp:docstring"/>
</dd>
</xsl:template>
<xsl:template match="tp:possible-errors/tp:error">
<dt xmlns="http://www.w3.org/1999/xhtml">
<code><xsl:value-of select="@name"/></code>
</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<xsl:variable name="name" select="@name"/>
<xsl:choose>
<xsl:when test="tp:docstring">
<xsl:apply-templates select="tp:docstring"/>
</xsl:when>
<xsl:when test="//tp:errors/tp:error[concat(../@namespace, '.', translate(@name, ' ', ''))=$name]/tp:docstring">
<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>
</xsl:when>
<xsl:otherwise>
(Undocumented.)
</xsl:otherwise>
</xsl:choose>
</dd>
</xsl:template>
<xsl:template match="signal">
<xsl:call-template name="binding-name-check"/>
<xsl:if test="not(parent::interface)">
<xsl:message terminate="yes">
<xsl:text>ERR: signal </xsl:text>
<xsl:value-of select="@name"/>
<xsl:text> does not have an interface as parent </xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: missing @name on a signal of </xsl:text>
<xsl:value-of select="../@name"/>
<xsl:text> </xsl:text>
</xsl:message>
</xsl:if>
<xsl:for-each select="arg">
<xsl:if test="not(@type) or @type = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: an arg of signal </xsl:text>
<xsl:value-of select="concat(../../@name, '.', ../@name)"/>
<xsl:text> has no type</xsl:text>
</xsl:message>
</xsl:if>
<xsl:if test="not(@name) or @name = ''">
<xsl:message terminate="yes">
<xsl:text>ERR: an arg of signal </xsl:text>
<xsl:value-of select="concat(../../@name, '.', ../@name)"/>
<xsl:text> has no name</xsl:text>
</xsl:message>
</xsl:if>
<xsl:choose>
<xsl:when test="not(@direction)"/>
<xsl:when test="@direction='in'">
<xsl:message terminate="no">
<xsl:text>INFO: an arg of signal </xsl:text>
<xsl:value-of select="concat(../../@name, '.', ../@name)"/>
<xsl:text> has unnecessary direction 'in'</xsl:text>
</xsl:message>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>ERR: an arg of signal </xsl:text>
<xsl:value-of select="concat(../../@name, '.', ../@name)"/>
<xsl:text> has direction other than 'in'</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<div xmlns="http://www.w3.org/1999/xhtml" class="signal">
<h3 xmlns="http://www.w3.org/1999/xhtml">
<a name="{concat(../@name, concat('.', @name))}">
<xsl:value-of select="@name"/>
</a> (
<xsl:for-each xmlns="" select="arg">
<xsl:value-of select="@type"/>: <xsl:value-of select="@name"/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
)</h3>
<div xmlns="http://www.w3.org/1999/xhtml" class="docstring">
<xsl:apply-templates select="tp:docstring"/>
<xsl:apply-templates select="tp:added"/>
<xsl:apply-templates select="tp:changed"/>
<xsl:apply-templates select="tp:deprecated"/>
</div>
<xsl:if test="arg">
<div xmlns="http://www.w3.org/1999/xhtml">
<h4>Parameters</h4>
<dl xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates select="arg" mode="parameters-in-docstring"/>
</dl>
</div>
</xsl:if>
</div>
</xsl:template>
<xsl:output method="xml" indent="no" encoding="ascii"
omit-xml-declaration="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
<xsl:template match="/tp:spec">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<xsl:value-of select="tp:title"/>
<xsl:if test="tp:version">
<xsl:text> version </xsl:text>
<xsl:value-of select="tp:version"/>
</xsl:if>
</title>
<style type="text/css">
body {
font-family: sans-serif;
margin: 2em;
height: 100%;
font-size: 1.2em;
}
h1 {
padding-top: 5px;
padding-bottom: 5px;
font-size: 1.6em;
background: #dadae2;
}
h2 {
font-size: 1.3em;
}
h3 {
font-size: 1.2em;
}
a:link, a:visited, a:link:hover, a:visited:hover {
font-weight: bold;
}
.topbox {
padding-top: 10px;
padding-left: 10px;
border-bottom: black solid 1px;
padding-bottom: 10px;
background: #dadae2;
font-size: 2em;
font-weight: bold;
color: #5c5c5c;
}
.topnavbox {
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
background: #abacba;
border-bottom: black solid 1px;
font-size: 1.2em;
}
.topnavbox a{
color: black;
font-weight: normal;
}
.sidebar {
float: left;
/* width:9em;
border-right:#abacba solid 1px;
border-left: #abacba solid 1px;
height:100%; */
border: #abacba solid 1px;
padding-left: 10px;
margin-left: 10px;
padding-right: 10px;
margin-right: 10px;
color: #5d5d5d;
background: #dadae2;
}
.sidebar a {
text-decoration: none;
border-bottom: #e29625 dotted 1px;
color: #e29625;
font-weight: normal;
}
.sidebar h1 {
font-size: 1.2em;
color: black;
}
.sidebar ul {
padding-left: 25px;
padding-bottom: 10px;
border-bottom: #abacba solid 1px;
}
.sidebar li {
padding-top: 2px;
padding-bottom: 2px;
}
.sidebar h2 {
font-style:italic;
font-size: 0.81em;
padding-left: 5px;
padding-right: 5px;
font-weight: normal;
}
.date {
font-size: 0.6em;
float: right;
font-style: italic;
}
.method, .signal, .property {
margin-left: 1em;
margin-right: 4em;
}
.rationale {
font-style: italic;
border-left: 0.25em solid #808080;
padding-left: 0.5em;
}
.added {
color: #006600;
background: #ffffff;
}
.deprecated {
color: #ff0000;
background: #ffffff;
}
table, tr, td, th {
border: 1px solid #666;
}
</style>
</head>
<body>
<h1 class="topbox">
<xsl:value-of select="tp:title" />
</h1>
<xsl:if test="tp:version">
<h2>Version <xsl:value-of select="string(tp:version)"/></h2>
</xsl:if>
<xsl:apply-templates select="tp:copyright"/>
<xsl:apply-templates select="tp:license"/>
<xsl:apply-templates select="tp:docstring"/>
<h2>Interfaces</h2>
<ul>
<xsl:for-each select="//node/interface">
<li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
</xsl:for-each>
</ul>
<xsl:apply-templates select="//node"/>
<xsl:apply-templates select="tp:generic-types"/>
<xsl:apply-templates select="tp:errors"/>
<h1>Index</h1>
<h2>Index of interfaces</h2>
<ul>
<xsl:for-each select="//node/interface">
<li><code><a href="#{@name}"><xsl:value-of select="@name"/></a></code></li>
</xsl:for-each>
</ul>
<h2>Index of types</h2>
<ul>
<xsl:for-each select="//tp:simple-type | //tp:enum | //tp:flags | //tp:mapping | //tp:struct | //tp:external-type">
<xsl:sort select="@name"/>
<li>
<code>
<a href="#type-{@name}">
<xsl:value-of select="@name"/>
</a>
</code>
<xsl:apply-templates mode="in-index" select="."/>
</li>
</xsl:for-each>
</ul>
</body>
</html>
</xsl:template>
<xsl:template match="node">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="text()">
<xsl:if test="normalize-space(.) != ''">
<xsl:message terminate="yes">
<xsl:text>Stray text: {{{</xsl:text>
<xsl:value-of select="." />
<xsl:text>}}} </xsl:text>
</xsl:message>
</xsl:if>
</xsl:template>
<xsl:template match="*">
<xsl:message terminate="yes">
<xsl:text>Unrecognised element: {</xsl:text>
<xsl:value-of select="namespace-uri(.)" />
<xsl:text>}</xsl:text>
<xsl:value-of select="local-name(.)" />
<xsl:text> </xsl:text>
</xsl:message>
</xsl:template>
</xsl:stylesheet>
<!-- vim:set sw=2 sts=2 et: -->
|