Rocco Rutte:
[apps/madmutt.git] / doc / xslt / xhtml / synop.xsl
1 <?xml version="1.0" encoding="US-ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets. Do not edit this file.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
5
6 <!-- ********************************************************************
7      $Id$
8      ********************************************************************
9
10      This file is part of the XSL DocBook Stylesheet distribution.
11      See ../README or http://nwalsh.com/docbook/xsl/ for copyright
12      and other information.
13
14      ******************************************************************** -->
15
16 <!-- ==================================================================== -->
17
18 <!-- synopsis is in verbatim -->
19
20 <!-- ==================================================================== -->
21
22 <xsl:template match="cmdsynopsis">
23   <div class="{name(.)}">
24     <p>
25       <xsl:call-template name="anchor"/>
26       <xsl:apply-templates/>
27     </p>
28   </div>
29 </xsl:template>
30
31 <xsl:template match="cmdsynopsis/command">
32   <br/>
33   <xsl:call-template name="inline.monoseq"/>
34   <xsl:text> </xsl:text>
35 </xsl:template>
36
37 <xsl:template match="cmdsynopsis/command[1]" priority="2">
38   <xsl:call-template name="inline.monoseq"/>
39   <xsl:text> </xsl:text>
40 </xsl:template>
41
42 <xsl:template match="group|arg" name="group-or-arg">
43   <xsl:variable name="choice" select="@choice"/>
44   <xsl:variable name="rep" select="@rep"/>
45   <xsl:variable name="sepchar">
46     <xsl:choose>
47       <xsl:when test="ancestor-or-self::*/@sepchar">
48         <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
49       </xsl:when>
50       <xsl:otherwise>
51         <xsl:text> </xsl:text>
52       </xsl:otherwise>
53     </xsl:choose>
54   </xsl:variable>
55   <xsl:if test="position()&gt;1"><xsl:value-of select="$sepchar"/></xsl:if>
56   <xsl:choose>
57     <xsl:when test="$choice='plain'">
58       <xsl:value-of select="$arg.choice.plain.open.str"/>
59     </xsl:when>
60     <xsl:when test="$choice='req'">
61       <xsl:value-of select="$arg.choice.req.open.str"/>
62     </xsl:when>
63     <xsl:when test="$choice='opt'">
64       <xsl:value-of select="$arg.choice.opt.open.str"/>
65     </xsl:when>
66     <xsl:otherwise>
67       <xsl:value-of select="$arg.choice.def.open.str"/>
68     </xsl:otherwise>
69   </xsl:choose>
70   <xsl:apply-templates/>
71   <xsl:choose>
72     <xsl:when test="$rep='repeat'">
73       <xsl:value-of select="$arg.rep.repeat.str"/>
74     </xsl:when>
75     <xsl:when test="$rep='norepeat'">
76       <xsl:value-of select="$arg.rep.norepeat.str"/>
77     </xsl:when>
78     <xsl:otherwise>
79       <xsl:value-of select="$arg.rep.def.str"/>
80     </xsl:otherwise>
81   </xsl:choose>
82   <xsl:choose>
83     <xsl:when test="$choice='plain'">
84       <xsl:value-of select="$arg.choice.plain.close.str"/>
85     </xsl:when>
86     <xsl:when test="$choice='req'">
87       <xsl:value-of select="$arg.choice.req.close.str"/>
88     </xsl:when>
89     <xsl:when test="$choice='opt'">
90       <xsl:value-of select="$arg.choice.opt.close.str"/>
91     </xsl:when>
92     <xsl:otherwise>
93       <xsl:value-of select="$arg.choice.def.close.str"/>
94     </xsl:otherwise>
95   </xsl:choose>
96 </xsl:template>
97
98 <xsl:template match="group/arg">
99   <xsl:variable name="choice" select="@choice"/>
100   <xsl:variable name="rep" select="@rep"/>
101   <xsl:if test="position()&gt;1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
102   <xsl:call-template name="group-or-arg"/>
103 </xsl:template>
104
105 <xsl:template match="sbr">
106   <br/>
107 </xsl:template>
108
109 <!-- ==================================================================== -->
110
111 <xsl:template match="synopfragmentref">
112   <xsl:variable name="target" select="key('id',@linkend)"/>
113   <xsl:variable name="snum">
114     <xsl:apply-templates select="$target" mode="synopfragment.number"/>
115   </xsl:variable>
116   <i>
117     <a href="#{@linkend}">
118       <xsl:text>(</xsl:text>
119       <xsl:value-of select="$snum"/>
120       <xsl:text>)</xsl:text>
121     </a>
122     <xsl:text>&#160;</xsl:text>
123     <xsl:apply-templates/>
124   </i>
125 </xsl:template>
126
127 <xsl:template match="synopfragment" mode="synopfragment.number">
128   <xsl:number format="1"/>
129 </xsl:template>
130
131 <xsl:template match="synopfragment">
132   <xsl:variable name="snum">
133     <xsl:apply-templates select="." mode="synopfragment.number"/>
134   </xsl:variable>
135   <p>
136     <a id="{@id}">
137       <xsl:text>(</xsl:text>
138       <xsl:value-of select="$snum"/>
139       <xsl:text>)</xsl:text>
140     </a>
141     <xsl:text> </xsl:text>
142     <xsl:apply-templates/>
143   </p>
144 </xsl:template>
145
146 <xsl:template match="funcsynopsis">
147   <xsl:call-template name="informal.object"/>
148 </xsl:template>
149
150 <xsl:template match="funcsynopsisinfo">
151   <pre class="{name(.)}"><xsl:apply-templates/></pre>
152 </xsl:template>
153
154 <!-- ====================================================================== -->
155 <!-- funcprototype -->
156 <!--
157
158 funcprototype ::= (funcdef,
159                    (void|varargs|paramdef+))
160
161 funcdef       ::= (#PCDATA|type|replaceable|function)*
162
163 paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
164 -->
165
166 <xsl:template match="funcprototype">
167   <xsl:variable name="html-style">
168     <xsl:call-template name="dbhtml-attribute">
169       <xsl:with-param name="pis" select="ancestor::funcsynopsis//processing-instruction('dbhtml')"/>
170       <xsl:with-param name="attribute" select="'funcsynopsis-style'"/>
171     </xsl:call-template>
172   </xsl:variable>
173
174   <xsl:variable name="style">
175     <xsl:choose>
176       <xsl:when test="$html-style != ''">
177         <xsl:value-of select="$html-style"/>
178       </xsl:when>
179       <xsl:otherwise>
180         <xsl:value-of select="$funcsynopsis.style"/>
181       </xsl:otherwise>
182     </xsl:choose>
183   </xsl:variable>
184
185   <xsl:variable name="tabular-p" select="$funcsynopsis.tabular.threshold &gt; 0                         and string-length(.) &gt; $funcsynopsis.tabular.threshold"/>
186
187   <xsl:choose>
188     <xsl:when test="$style = 'kr' and $tabular-p">
189       <xsl:apply-templates select="." mode="kr-tabular"/>
190     </xsl:when>
191     <xsl:when test="$style = 'kr'">
192       <xsl:apply-templates select="." mode="kr-nontabular"/>
193     </xsl:when>
194     <xsl:when test="$style = 'ansi' and $tabular-p">
195       <xsl:apply-templates select="." mode="ansi-tabular"/>
196     </xsl:when>
197     <xsl:otherwise>
198       <xsl:apply-templates select="." mode="ansi-nontabular"/>
199     </xsl:otherwise>
200   </xsl:choose>
201 </xsl:template>
202
203 <!-- ====================================================================== -->
204 <!-- funcprototype: kr, non-tabular -->
205
206 <xsl:template match="funcprototype" mode="kr-nontabular">
207   <p>
208     <xsl:apply-templates mode="kr-nontabular"/>
209     <xsl:if test="paramdef">
210       <br/>
211       <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
212     </xsl:if>
213   </p>
214 </xsl:template>
215
216 <xsl:template match="funcdef" mode="kr-nontabular">
217   <code class="{name(.)}">
218     <xsl:apply-templates mode="kr-nontabular"/>
219     <xsl:text>(</xsl:text>
220   </code>
221 </xsl:template>
222
223 <xsl:template match="funcdef/function" mode="kr-nontabular">
224   <xsl:choose>
225     <xsl:when test="$funcsynopsis.decoration != 0">
226       <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
227     </xsl:when>
228     <xsl:otherwise>
229       <xsl:apply-templates mode="kr-nontabular"/>
230     </xsl:otherwise>
231   </xsl:choose>
232 </xsl:template>
233
234 <xsl:template match="void" mode="kr-nontabular">
235   <code>)</code>
236   <xsl:text>;</xsl:text>
237 </xsl:template>
238
239 <xsl:template match="varargs" mode="kr-nontabular">
240   <xsl:text>...</xsl:text>
241   <code>)</code>
242   <xsl:text>;</xsl:text>
243 </xsl:template>
244
245 <xsl:template match="paramdef" mode="kr-nontabular">
246   <xsl:apply-templates select="parameter" mode="kr-nontabular"/>
247   <xsl:choose>
248     <xsl:when test="following-sibling::*">
249       <xsl:text>, </xsl:text>
250     </xsl:when>
251     <xsl:otherwise>
252       <code>)</code>
253       <xsl:text>;</xsl:text>
254     </xsl:otherwise>
255   </xsl:choose>
256 </xsl:template>
257
258 <xsl:template match="paramdef/parameter" mode="kr-nontabular">
259   <xsl:choose>
260     <xsl:when test="$funcsynopsis.decoration != 0">
261       <var class="pdparam">
262         <xsl:apply-templates mode="kr-nontabular"/>
263       </var>
264     </xsl:when>
265     <xsl:otherwise>
266       <xsl:apply-templates mode="kr-nontabular"/>
267     </xsl:otherwise>
268   </xsl:choose>
269 </xsl:template>
270
271 <xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
272   <xsl:if test="preceding-sibling::paramdef"><br/></xsl:if>
273   <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
274   <xsl:text>;</xsl:text>
275 </xsl:template>
276
277 <xsl:template match="paramdef/parameter" mode="kr-funcsynopsis-mode">
278   <xsl:choose>
279     <xsl:when test="$funcsynopsis.decoration != 0">
280       <var class="pdparam">
281         <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
282       </var>
283     </xsl:when>
284     <xsl:otherwise>
285       <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
286     </xsl:otherwise>
287   </xsl:choose>
288 </xsl:template>
289
290 <xsl:template match="funcparams" mode="kr-funcsynopsis-mode">
291   <code>(</code>
292   <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
293   <code>)</code>
294   <xsl:text>;</xsl:text>
295 </xsl:template>
296
297 <!-- ====================================================================== -->
298 <!-- funcprototype: kr, tabular -->
299
300 <xsl:template match="funcprototype" mode="kr-tabular">
301   <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
302     <tr>
303       <td>
304         <xsl:apply-templates select="funcdef" mode="kr-tabular"/>
305       </td>
306       <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
307     </tr>
308     <xsl:for-each select="(void|varargs|paramdef)[position() &gt; 1]">
309       <tr>
310         <td>&#160;</td>
311         <xsl:apply-templates select="." mode="kr-tabular"/>
312       </tr>
313     </xsl:for-each>
314   </table>
315   <xsl:if test="paramdef">
316     <table border="0" summary="Function argument synopsis" cellspacing="0" cellpadding="0">
317       <xsl:if test="following-sibling::funcprototype">
318         <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
319       </xsl:if>
320       <xsl:apply-templates select="paramdef" mode="kr-tabular-funcsynopsis-mode"/>
321     </table>
322   </xsl:if>
323 </xsl:template>
324
325 <xsl:template match="funcdef" mode="kr-tabular">
326   <code class="{name(.)}">
327     <xsl:apply-templates mode="kr-tabular"/>
328     <xsl:text>(</xsl:text>
329   </code>
330 </xsl:template>
331
332 <xsl:template match="funcdef/function" mode="kr-tabular">
333   <xsl:choose>
334     <xsl:when test="$funcsynopsis.decoration != 0">
335       <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
336     </xsl:when>
337     <xsl:otherwise>
338       <xsl:apply-templates mode="kr-tabular"/>
339     </xsl:otherwise>
340   </xsl:choose>
341 </xsl:template>
342
343 <xsl:template match="void" mode="kr-tabular">
344   <td>
345     <code>)</code>
346     <xsl:text>;</xsl:text>
347   </td>
348   <td>&#160;</td>
349 </xsl:template>
350
351 <xsl:template match="varargs" mode="kr-tabular">
352   <td>
353     <xsl:text>...</xsl:text>
354     <code>)</code>
355     <xsl:text>;</xsl:text>
356   </td>
357   <td>&#160;</td>
358 </xsl:template>
359
360 <xsl:template match="paramdef" mode="kr-tabular">
361   <td>
362     <xsl:apply-templates select="parameter" mode="kr-tabular"/>
363     <xsl:choose>
364       <xsl:when test="following-sibling::*">
365         <xsl:text>, </xsl:text>
366       </xsl:when>
367       <xsl:otherwise>
368         <code>)</code>
369         <xsl:text>;</xsl:text>
370       </xsl:otherwise>
371     </xsl:choose>
372   </td>
373   <td>&#160;</td>
374 </xsl:template>
375
376 <xsl:template match="paramdef/parameter" mode="kr-tabular">
377   <xsl:choose>
378     <xsl:when test="$funcsynopsis.decoration != 0">
379       <var class="pdparam">
380         <xsl:apply-templates mode="kr-tabular"/>
381       </var>
382     </xsl:when>
383     <xsl:otherwise>
384       <xsl:apply-templates mode="kr-tabular"/>
385     </xsl:otherwise>
386   </xsl:choose>
387 </xsl:template>
388
389 <xsl:template match="paramdef" mode="kr-tabular-funcsynopsis-mode">
390   <tr>
391     <xsl:choose>
392       <xsl:when test="type and funcparams">
393         <td>
394           <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
395           <xsl:text>&#160;</xsl:text>
396         </td>
397         <td>
398           <xsl:apply-templates select="type/following-sibling::node()" mode="kr-tabular-funcsynopsis-mode"/>
399         </td>
400       </xsl:when>
401       <xsl:when test="funcparams">
402         <td colspan="2">
403           <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
404         </td>
405       </xsl:when>
406       <xsl:otherwise>
407         <td>
408           <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="kr-tabular-funcsynopsis-mode"/>
409           <xsl:text>&#160;</xsl:text>
410         </td>
411         <td>
412           <xsl:apply-templates select="parameter" mode="kr-tabular"/>
413           <xsl:apply-templates select="parameter/following-sibling::node()[not(self::parameter)]" mode="kr-tabular-funcsynopsis-mode"/>
414           <xsl:text>;</xsl:text>
415         </td>
416       </xsl:otherwise>
417     </xsl:choose>
418   </tr>
419 </xsl:template>
420
421 <xsl:template match="paramdef/parameter" mode="kr-tabular-funcsynopsis-mode">
422   <xsl:choose>
423     <xsl:when test="$funcsynopsis.decoration != 0">
424       <var class="pdparam">
425         <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
426       </var>
427     </xsl:when>
428     <xsl:otherwise>
429       <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
430     </xsl:otherwise>
431   </xsl:choose>
432 </xsl:template>
433
434 <xsl:template match="funcparams" mode="kr-tabular-funcsynopsis-mode">
435   <code>(</code>
436   <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
437   <code>)</code>
438   <xsl:text>;</xsl:text>
439 </xsl:template>
440
441 <!-- ====================================================================== -->
442 <!-- funcprototype: ansi, non-tabular -->
443
444 <xsl:template match="funcprototype" mode="ansi-nontabular">
445   <p>
446     <xsl:apply-templates mode="ansi-nontabular"/>
447   </p>
448 </xsl:template>
449
450 <xsl:template match="funcdef" mode="ansi-nontabular">
451   <code class="{name(.)}">
452     <xsl:apply-templates mode="ansi-nontabular"/>
453     <xsl:text>(</xsl:text>
454   </code>
455 </xsl:template>
456
457 <xsl:template match="funcdef/function" mode="ansi-nontabular">
458   <xsl:choose>
459     <xsl:when test="$funcsynopsis.decoration != 0">
460       <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
461     </xsl:when>
462     <xsl:otherwise>
463       <xsl:apply-templates mode="ansi-nontabular"/>
464     </xsl:otherwise>
465   </xsl:choose>
466 </xsl:template>
467
468 <xsl:template match="void" mode="ansi-nontabular">
469   <code>void)</code>
470   <xsl:text>;</xsl:text>
471 </xsl:template>
472
473 <xsl:template match="varargs" mode="ansi-nontabular">
474   <xsl:text>...</xsl:text>
475   <code>)</code>
476   <xsl:text>;</xsl:text>
477 </xsl:template>
478
479 <xsl:template match="paramdef" mode="ansi-nontabular">
480   <xsl:apply-templates mode="ansi-nontabular"/>
481   <xsl:choose>
482     <xsl:when test="following-sibling::*">
483       <xsl:text>, </xsl:text>
484     </xsl:when>
485     <xsl:otherwise>
486       <code>)</code>
487       <xsl:text>;</xsl:text>
488     </xsl:otherwise>
489   </xsl:choose>
490 </xsl:template>
491
492 <xsl:template match="paramdef/parameter" mode="ansi-nontabular">
493   <xsl:choose>
494     <xsl:when test="$funcsynopsis.decoration != 0">
495       <var class="pdparam">
496         <xsl:apply-templates mode="ansi-nontabular"/>
497       </var>
498     </xsl:when>
499     <xsl:otherwise>
500       <xsl:apply-templates mode="ansi-nontabular"/>
501     </xsl:otherwise>
502   </xsl:choose>
503 </xsl:template>
504
505 <xsl:template match="funcparams" mode="ansi-nontabular">
506   <code>(</code>
507   <xsl:apply-templates mode="ansi-nontabular"/>
508   <code>)</code>
509 </xsl:template>
510
511 <!-- ====================================================================== -->
512 <!-- funcprototype: ansi, tabular -->
513
514 <xsl:template match="funcprototype" mode="ansi-tabular">
515   <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
516     <xsl:if test="following-sibling::funcprototype">
517       <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
518     </xsl:if>
519     <tr>
520       <td>
521         <xsl:apply-templates select="funcdef" mode="ansi-tabular"/>
522       </td>
523       <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
524     </tr>
525     <xsl:for-each select="(void|varargs|paramdef)[position() &gt; 1]">
526       <tr>
527         <td>&#160;</td>
528         <xsl:apply-templates select="." mode="ansi-tabular"/>
529       </tr>
530     </xsl:for-each>
531   </table>
532 </xsl:template>
533
534 <xsl:template match="funcdef" mode="ansi-tabular">
535   <code class="{name(.)}">
536     <xsl:apply-templates mode="ansi-tabular"/>
537     <xsl:text>(</xsl:text>
538   </code>
539 </xsl:template>
540
541 <xsl:template match="funcdef/function" mode="ansi-tabular">
542   <xsl:choose>
543     <xsl:when test="$funcsynopsis.decoration != 0">
544       <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
545     </xsl:when>
546     <xsl:otherwise>
547       <xsl:apply-templates mode="kr-tabular"/>
548     </xsl:otherwise>
549   </xsl:choose>
550 </xsl:template>
551
552 <xsl:template match="void" mode="ansi-tabular">
553   <td>
554     <code>void)</code>
555     <xsl:text>;</xsl:text>
556   </td>
557   <td>&#160;</td>
558 </xsl:template>
559
560 <xsl:template match="varargs" mode="ansi-tabular">
561   <td>
562     <xsl:text>...</xsl:text>
563     <code>)</code>
564     <xsl:text>;</xsl:text>
565   </td>
566   <td>&#160;</td>
567 </xsl:template>
568
569 <xsl:template match="paramdef" mode="ansi-tabular">
570   <xsl:choose>
571     <xsl:when test="type and funcparams">
572       <td>
573         <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
574         <xsl:text>&#160;</xsl:text>
575       </td>
576       <td>
577         <xsl:apply-templates select="type/following-sibling::node()" mode="kr-tabular-funcsynopsis-mode"/>
578       </td>
579     </xsl:when>
580     <xsl:otherwise>
581       <td>
582         <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="ansi-tabular"/>
583         <xsl:text>&#160;</xsl:text>
584       </td>
585       <td>
586         <xsl:apply-templates select="parameter" mode="ansi-tabular"/>
587         <xsl:apply-templates select="parameter/following-sibling::node()[not(self::parameter)]" mode="ansi-tabular"/>
588         <xsl:choose>
589           <xsl:when test="following-sibling::*">
590             <xsl:text>, </xsl:text>
591           </xsl:when>
592           <xsl:otherwise>
593             <code>)</code>
594             <xsl:text>;</xsl:text>
595           </xsl:otherwise>
596         </xsl:choose>
597       </td>
598     </xsl:otherwise>
599   </xsl:choose>
600 </xsl:template>
601
602 <xsl:template match="paramdef/parameter" mode="ansi-tabular">
603   <xsl:choose>
604     <xsl:when test="$funcsynopsis.decoration != 0">
605       <var class="pdparam">
606         <xsl:apply-templates mode="ansi-tabular"/>
607       </var>
608     </xsl:when>
609     <xsl:otherwise>
610       <xsl:apply-templates mode="ansi-tabular"/>
611     </xsl:otherwise>
612   </xsl:choose>
613 </xsl:template>
614
615 <xsl:template match="funcparams" mode="ansi-tabular">
616   <code>(</code>
617   <xsl:apply-templates/>
618   <code>)</code>
619 </xsl:template>
620
621 <!-- ====================================================================== -->
622
623 <xsl:variable name="default-classsynopsis-language">java</xsl:variable>
624
625 <xsl:template match="classsynopsis                      |fieldsynopsis                      |methodsynopsis                      |constructorsynopsis                      |destructorsynopsis">
626   <xsl:param name="language">
627     <xsl:choose>
628       <xsl:when test="@language">
629         <xsl:value-of select="@language"/>
630       </xsl:when>
631       <xsl:otherwise>
632         <xsl:value-of select="$default-classsynopsis-language"/>
633       </xsl:otherwise>
634     </xsl:choose>
635   </xsl:param>
636
637   <xsl:choose>
638     <xsl:when test="$language='java'">
639       <xsl:apply-templates select="." mode="java"/>
640     </xsl:when>
641     <xsl:when test="$language='perl'">
642       <xsl:apply-templates select="." mode="perl"/>
643     </xsl:when>
644     <xsl:when test="$language='idl'">
645       <xsl:apply-templates select="." mode="idl"/>
646     </xsl:when>
647     <xsl:when test="$language='cpp'">
648       <xsl:apply-templates select="." mode="cpp"/>
649     </xsl:when>
650     <xsl:otherwise>
651       <xsl:message>
652         <xsl:text>Unrecognized language on </xsl:text>
653         <xsl:value-of select="name(.)"/>
654         <xsl:text>: </xsl:text>
655         <xsl:value-of select="$language"/>
656       </xsl:message>
657       <xsl:apply-templates select=".">
658         <xsl:with-param name="language" select="$default-classsynopsis-language"/>
659       </xsl:apply-templates>
660     </xsl:otherwise>
661   </xsl:choose>
662 </xsl:template>
663
664 <xsl:template name="synop-break">
665   <xsl:if test="parent::classsynopsis                 or (following-sibling::fieldsynopsis                     |following-sibling::methodsynopsis                     |following-sibling::constructorsynopsis                     |following-sibling::destructorsynopsis)">
666     <br/>
667   </xsl:if>
668 </xsl:template>
669
670
671 <!-- ===== Java ======================================================== -->
672
673 <xsl:template match="classsynopsis" mode="java">
674   <pre class="{name(.)}">
675     <xsl:apply-templates select="ooclass[1]" mode="java"/>
676     <xsl:if test="ooclass[position() &gt; 1]">
677       <xsl:text> extends</xsl:text>
678       <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="java"/>
679       <xsl:if test="oointerface|ooexception">
680         <br/>
681         <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
682       </xsl:if>
683     </xsl:if>
684     <xsl:if test="oointerface">
685       <xsl:text>implements</xsl:text>
686       <xsl:apply-templates select="oointerface" mode="java"/>
687       <xsl:if test="ooexception">
688         <br/>
689         <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
690       </xsl:if>
691     </xsl:if>
692     <xsl:if test="ooexception">
693       <xsl:text>throws</xsl:text>
694       <xsl:apply-templates select="ooexception" mode="java"/>
695     </xsl:if>
696     <xsl:text>&#160;{</xsl:text>
697     <br/>
698     <xsl:apply-templates select="constructorsynopsis                                  |destructorsynopsis                                  |fieldsynopsis                                  |methodsynopsis                                  |classsynopsisinfo" mode="java"/>
699     <xsl:text>}</xsl:text>
700   </pre>
701 </xsl:template>
702
703 <xsl:template match="classsynopsisinfo" mode="java">
704   <xsl:apply-templates mode="java"/>
705 </xsl:template>
706
707 <xsl:template match="ooclass|oointerface|ooexception" mode="java">
708   <xsl:choose>
709     <xsl:when test="position() &gt; 1">
710       <xsl:text>, </xsl:text>
711     </xsl:when>
712     <xsl:otherwise>
713       <xsl:text> </xsl:text>
714     </xsl:otherwise>
715   </xsl:choose>
716   <span class="{name(.)}">
717     <xsl:apply-templates mode="java"/>
718   </span>
719 </xsl:template>
720
721 <xsl:template match="modifier" mode="java">
722   <span class="{name(.)}">
723     <xsl:apply-templates mode="java"/>
724     <xsl:text>&#160;</xsl:text>
725   </span>
726 </xsl:template>
727
728 <xsl:template match="classname" mode="java">
729   <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
730     <xsl:text>, </xsl:text>
731   </xsl:if>
732   <span class="{name(.)}">
733     <xsl:apply-templates mode="java"/>
734   </span>
735 </xsl:template>
736
737 <xsl:template match="interfacename" mode="java">
738   <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
739     <xsl:text>, </xsl:text>
740   </xsl:if>
741   <span class="{name(.)}">
742     <xsl:apply-templates mode="java"/>
743   </span>
744 </xsl:template>
745
746 <xsl:template match="exceptionname" mode="java">
747   <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
748     <xsl:text>, </xsl:text>
749   </xsl:if>
750   <span class="{name(.)}">
751     <xsl:apply-templates mode="java"/>
752   </span>
753 </xsl:template>
754
755 <xsl:template match="fieldsynopsis" mode="java">
756   <code class="{name(.)}">
757     <xsl:if test="parent::classsynopsis">
758       <xsl:text>&#160;&#160;</xsl:text>
759     </xsl:if>
760     <xsl:apply-templates mode="java"/>
761     <xsl:text>;</xsl:text>
762   </code>
763   <xsl:call-template name="synop-break"/>
764 </xsl:template>
765
766 <xsl:template match="type" mode="java">
767   <span class="{name(.)}">
768     <xsl:apply-templates mode="java"/>
769     <xsl:text>&#160;</xsl:text>
770   </span>
771 </xsl:template>
772
773 <xsl:template match="varname" mode="java">
774   <span class="{name(.)}">
775     <xsl:apply-templates mode="java"/>
776     <xsl:text>&#160;</xsl:text>
777   </span>
778 </xsl:template>
779
780 <xsl:template match="initializer" mode="java">
781   <span class="{name(.)}">
782     <xsl:text>=&#160;</xsl:text>
783     <xsl:apply-templates mode="java"/>
784   </span>
785 </xsl:template>
786
787 <xsl:template match="void" mode="java">
788   <span class="{name(.)}">
789     <xsl:text>void&#160;</xsl:text>
790   </span>
791 </xsl:template>
792
793 <xsl:template match="methodname" mode="java">
794   <span class="{name(.)}">
795     <xsl:apply-templates mode="java"/>
796   </span>
797 </xsl:template>
798
799 <xsl:template match="methodparam" mode="java">
800   <xsl:param name="indent">0</xsl:param>
801   <xsl:if test="position() &gt; 1">
802     <xsl:text>,</xsl:text>
803     <br/>
804     <xsl:if test="$indent &gt; 0">
805       <xsl:call-template name="copy-string">
806         <xsl:with-param name="string">&#160;</xsl:with-param>
807         <xsl:with-param name="count" select="$indent + 1"/>
808       </xsl:call-template>
809     </xsl:if>
810   </xsl:if>
811   <span class="{name(.)}">
812     <xsl:apply-templates mode="java"/>
813   </span>
814 </xsl:template>
815
816 <xsl:template match="parameter" mode="java">
817   <span class="{name(.)}">
818     <xsl:apply-templates mode="java"/>
819   </span>
820 </xsl:template>
821
822 <xsl:template mode="java" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
823   <xsl:variable name="modifiers" select="modifier"/>
824   <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
825   <xsl:variable name="decl">
826     <xsl:if test="parent::classsynopsis">
827       <xsl:text>&#160;&#160;</xsl:text>
828     </xsl:if>
829     <xsl:apply-templates select="$modifiers" mode="java"/>
830
831     <!-- type -->
832     <xsl:if test="name($notmod[1]) != 'methodname'">
833       <xsl:apply-templates select="$notmod[1]" mode="java"/>
834     </xsl:if>
835
836     <xsl:apply-templates select="methodname" mode="java"/>
837   </xsl:variable>
838
839   <code class="{name(.)}">
840     <xsl:copy-of select="$decl"/>
841     <xsl:text>(</xsl:text>
842     <xsl:apply-templates select="methodparam" mode="java">
843       <xsl:with-param name="indent" select="string-length($decl)"/>
844     </xsl:apply-templates>
845     <xsl:text>)</xsl:text>
846     <xsl:if test="exceptionname">
847       <br/>
848       <xsl:text>&#160;&#160;&#160;&#160;throws&#160;</xsl:text>
849       <xsl:apply-templates select="exceptionname" mode="java"/>
850     </xsl:if>
851     <xsl:text>;</xsl:text>
852   </code>
853   <xsl:call-template name="synop-break"/>
854 </xsl:template>
855
856 <!-- ===== C++ ========================================================= -->
857
858 <xsl:template match="classsynopsis" mode="cpp">
859   <pre class="{name(.)}">
860     <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
861     <xsl:if test="ooclass[position() &gt; 1]">
862       <xsl:text>: </xsl:text>
863       <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="cpp"/>
864       <xsl:if test="oointerface|ooexception">
865         <br/>
866         <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
867       </xsl:if>
868     </xsl:if>
869     <xsl:if test="oointerface">
870       <xsl:text> implements</xsl:text>
871       <xsl:apply-templates select="oointerface" mode="cpp"/>
872       <xsl:if test="ooexception">
873         <br/>
874         <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
875       </xsl:if>
876     </xsl:if>
877     <xsl:if test="ooexception">
878       <xsl:text> throws</xsl:text>
879       <xsl:apply-templates select="ooexception" mode="cpp"/>
880     </xsl:if>
881     <xsl:text>&#160;{</xsl:text>
882     <br/>
883     <xsl:apply-templates select="constructorsynopsis                                  |destructorsynopsis                                  |fieldsynopsis                                  |methodsynopsis                                  |classsynopsisinfo" mode="cpp"/>
884     <xsl:text>}</xsl:text>
885   </pre>
886 </xsl:template>
887
888 <xsl:template match="classsynopsisinfo" mode="cpp">
889   <xsl:apply-templates mode="cpp"/>
890 </xsl:template>
891
892 <xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
893   <xsl:if test="position() &gt; 1">
894     <xsl:text>, </xsl:text>
895   </xsl:if>
896   <span class="{name(.)}">
897     <xsl:apply-templates mode="cpp"/>
898   </span>
899 </xsl:template>
900
901 <xsl:template match="modifier" mode="cpp">
902   <span class="{name(.)}">
903     <xsl:apply-templates mode="cpp"/>
904     <xsl:text>&#160;</xsl:text>
905   </span>
906 </xsl:template>
907
908 <xsl:template match="classname" mode="cpp">
909   <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
910     <xsl:text>, </xsl:text>
911   </xsl:if>
912   <span class="{name(.)}">
913     <xsl:apply-templates mode="cpp"/>
914   </span>
915 </xsl:template>
916
917 <xsl:template match="interfacename" mode="cpp">
918   <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
919     <xsl:text>, </xsl:text>
920   </xsl:if>
921   <span class="{name(.)}">
922     <xsl:apply-templates mode="cpp"/>
923   </span>
924 </xsl:template>
925
926 <xsl:template match="exceptionname" mode="cpp">
927   <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
928     <xsl:text>, </xsl:text>
929   </xsl:if>
930   <span class="{name(.)}">
931     <xsl:apply-templates mode="cpp"/>
932   </span>
933 </xsl:template>
934
935 <xsl:template match="fieldsynopsis" mode="cpp">
936   <code class="{name(.)}">
937     <xsl:if test="parent::classsynopsis">
938       <xsl:text>&#160;&#160;</xsl:text>
939     </xsl:if>
940     <xsl:apply-templates mode="cpp"/>
941     <xsl:text>;</xsl:text>
942   </code>
943   <xsl:call-template name="synop-break"/>
944 </xsl:template>
945
946 <xsl:template match="type" mode="cpp">
947   <span class="{name(.)}">
948     <xsl:apply-templates mode="cpp"/>
949     <xsl:text>&#160;</xsl:text>
950   </span>
951 </xsl:template>
952
953 <xsl:template match="varname" mode="cpp">
954   <span class="{name(.)}">
955     <xsl:apply-templates mode="cpp"/>
956     <xsl:text>&#160;</xsl:text>
957   </span>
958 </xsl:template>
959
960 <xsl:template match="initializer" mode="cpp">
961   <span class="{name(.)}">
962     <xsl:text>=&#160;</xsl:text>
963     <xsl:apply-templates mode="cpp"/>
964   </span>
965 </xsl:template>
966
967 <xsl:template match="void" mode="cpp">
968   <span class="{name(.)}">
969     <xsl:text>void&#160;</xsl:text>
970   </span>
971 </xsl:template>
972
973 <xsl:template match="methodname" mode="cpp">
974   <span class="{name(.)}">
975     <xsl:apply-templates mode="cpp"/>
976   </span>
977 </xsl:template>
978
979 <xsl:template match="methodparam" mode="cpp">
980   <xsl:if test="position() &gt; 1">
981     <xsl:text>, </xsl:text>
982   </xsl:if>
983   <span class="{name(.)}">
984     <xsl:apply-templates mode="cpp"/>
985   </span>
986 </xsl:template>
987
988 <xsl:template match="parameter" mode="cpp">
989   <span class="{name(.)}">
990     <xsl:apply-templates mode="cpp"/>
991   </span>
992 </xsl:template>
993
994 <xsl:template mode="cpp" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
995   <xsl:variable name="modifiers" select="modifier"/>
996   <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
997
998   <code class="{name(.)}">
999     <xsl:if test="parent::classsynopsis">
1000       <xsl:text>&#160;&#160;</xsl:text>
1001     </xsl:if>
1002     <xsl:apply-templates select="$modifiers" mode="cpp"/>
1003
1004     <!-- type -->
1005     <xsl:if test="name($notmod[1]) != 'methodname'">
1006       <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
1007     </xsl:if>
1008
1009     <xsl:apply-templates select="methodname" mode="cpp"/>
1010     <xsl:text>(</xsl:text>
1011     <xsl:apply-templates select="methodparam" mode="cpp"/>
1012     <xsl:text>)</xsl:text>
1013     <xsl:if test="exceptionname">
1014       <br/>
1015       <xsl:text>&#160;&#160;&#160;&#160;throws&#160;</xsl:text>
1016       <xsl:apply-templates select="exceptionname" mode="cpp"/>
1017     </xsl:if>
1018     <xsl:text>;</xsl:text>
1019   </code>
1020   <xsl:call-template name="synop-break"/>
1021 </xsl:template>
1022
1023 <!-- ===== IDL ========================================================= -->
1024
1025 <xsl:template match="classsynopsis" mode="idl">
1026   <pre class="{name(.)}">
1027     <xsl:text>interface </xsl:text>
1028     <xsl:apply-templates select="ooclass[1]" mode="idl"/>
1029     <xsl:if test="ooclass[position() &gt; 1]">
1030       <xsl:text>: </xsl:text>
1031       <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="idl"/>
1032       <xsl:if test="oointerface|ooexception">
1033         <br/>
1034         <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
1035       </xsl:if>
1036     </xsl:if>
1037     <xsl:if test="oointerface">
1038       <xsl:text> implements</xsl:text>
1039       <xsl:apply-templates select="oointerface" mode="idl"/>
1040       <xsl:if test="ooexception">
1041         <br/>
1042         <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
1043       </xsl:if>
1044     </xsl:if>
1045     <xsl:if test="ooexception">
1046       <xsl:text> throws</xsl:text>
1047       <xsl:apply-templates select="ooexception" mode="idl"/>
1048     </xsl:if>
1049     <xsl:text>&#160;{</xsl:text>
1050     <br/>
1051     <xsl:apply-templates select="constructorsynopsis                                  |destructorsynopsis                                  |fieldsynopsis                                  |methodsynopsis                                  |classsynopsisinfo" mode="idl"/>
1052     <xsl:text>}</xsl:text>
1053   </pre>
1054 </xsl:template>
1055
1056 <xsl:template match="classsynopsisinfo" mode="idl">
1057   <xsl:apply-templates mode="idl"/>
1058 </xsl:template>
1059
1060 <xsl:template match="ooclass|oointerface|ooexception" mode="idl">
1061   <xsl:if test="position() &gt; 1">
1062     <xsl:text>, </xsl:text>
1063   </xsl:if>
1064   <span class="{name(.)}">
1065     <xsl:apply-templates mode="idl"/>
1066   </span>
1067 </xsl:template>
1068
1069 <xsl:template match="modifier" mode="idl">
1070   <span class="{name(.)}">
1071     <xsl:apply-templates mode="idl"/>
1072     <xsl:text>&#160;</xsl:text>
1073   </span>
1074 </xsl:template>
1075
1076 <xsl:template match="classname" mode="idl">
1077   <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
1078     <xsl:text>, </xsl:text>
1079   </xsl:if>
1080   <span class="{name(.)}">
1081     <xsl:apply-templates mode="idl"/>
1082   </span>
1083 </xsl:template>
1084
1085 <xsl:template match="interfacename" mode="idl">
1086   <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
1087     <xsl:text>, </xsl:text>
1088   </xsl:if>
1089   <span class="{name(.)}">
1090     <xsl:apply-templates mode="idl"/>
1091   </span>
1092 </xsl:template>
1093
1094 <xsl:template match="exceptionname" mode="idl">
1095   <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
1096     <xsl:text>, </xsl:text>
1097   </xsl:if>
1098   <span class="{name(.)}">
1099     <xsl:apply-templates mode="idl"/>
1100   </span>
1101 </xsl:template>
1102
1103 <xsl:template match="fieldsynopsis" mode="idl">
1104   <code class="{name(.)}">
1105     <xsl:if test="parent::classsynopsis">
1106       <xsl:text>&#160;&#160;</xsl:text>
1107     </xsl:if>
1108     <xsl:apply-templates mode="idl"/>
1109     <xsl:text>;</xsl:text>
1110   </code>
1111   <xsl:call-template name="synop-break"/>
1112 </xsl:template>
1113
1114 <xsl:template match="type" mode="idl">
1115   <span class="{name(.)}">
1116     <xsl:apply-templates mode="idl"/>
1117     <xsl:text>&#160;</xsl:text>
1118   </span>
1119 </xsl:template>
1120
1121 <xsl:template match="varname" mode="idl">
1122   <span class="{name(.)}">
1123     <xsl:apply-templates mode="idl"/>
1124     <xsl:text>&#160;</xsl:text>
1125   </span>
1126 </xsl:template>
1127
1128 <xsl:template match="initializer" mode="idl">
1129   <span class="{name(.)}">
1130     <xsl:text>=&#160;</xsl:text>
1131     <xsl:apply-templates mode="idl"/>
1132   </span>
1133 </xsl:template>
1134
1135 <xsl:template match="void" mode="idl">
1136   <span class="{name(.)}">
1137     <xsl:text>void&#160;</xsl:text>
1138   </span>
1139 </xsl:template>
1140
1141 <xsl:template match="methodname" mode="idl">
1142   <span class="{name(.)}">
1143     <xsl:apply-templates mode="idl"/>
1144   </span>
1145 </xsl:template>
1146
1147 <xsl:template match="methodparam" mode="idl">
1148   <xsl:if test="position() &gt; 1">
1149     <xsl:text>, </xsl:text>
1150   </xsl:if>
1151   <span class="{name(.)}">
1152     <xsl:apply-templates mode="idl"/>
1153   </span>
1154 </xsl:template>
1155
1156 <xsl:template match="parameter" mode="idl">
1157   <span class="{name(.)}">
1158     <xsl:apply-templates mode="idl"/>
1159   </span>
1160 </xsl:template>
1161
1162 <xsl:template mode="idl" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
1163   <xsl:variable name="modifiers" select="modifier"/>
1164   <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
1165
1166   <code class="{name(.)}">
1167     <xsl:if test="parent::classsynopsis">
1168       <xsl:text>&#160;&#160;</xsl:text>
1169     </xsl:if>
1170     <xsl:apply-templates select="$modifiers" mode="idl"/>
1171
1172     <!-- type -->
1173     <xsl:if test="name($notmod[1]) != 'methodname'">
1174       <xsl:apply-templates select="$notmod[1]" mode="idl"/>
1175     </xsl:if>
1176
1177     <xsl:apply-templates select="methodname" mode="idl"/>
1178     <xsl:text>(</xsl:text>
1179     <xsl:apply-templates select="methodparam" mode="idl"/>
1180     <xsl:text>)</xsl:text>
1181     <xsl:if test="exceptionname">
1182       <br/>
1183       <xsl:text>&#160;&#160;&#160;&#160;raises(</xsl:text>
1184       <xsl:apply-templates select="exceptionname" mode="idl"/>
1185       <xsl:text>)</xsl:text>
1186     </xsl:if>
1187     <xsl:text>;</xsl:text>
1188   </code>
1189   <xsl:call-template name="synop-break"/>
1190 </xsl:template>
1191
1192 <!-- ===== Perl ======================================================== -->
1193
1194 <xsl:template match="classsynopsis" mode="perl">
1195   <pre class="{name(.)}">
1196     <xsl:text>package </xsl:text>
1197     <xsl:apply-templates select="ooclass[1]" mode="perl"/>
1198     <xsl:text>;</xsl:text>
1199     <br/>
1200
1201     <xsl:if test="ooclass[position() &gt; 1]">
1202       <xsl:text>@ISA = (</xsl:text>
1203       <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="perl"/>
1204       <xsl:text>);</xsl:text>
1205       <br/>
1206     </xsl:if>
1207
1208     <xsl:apply-templates select="constructorsynopsis                                  |destructorsynopsis                                  |fieldsynopsis                                  |methodsynopsis                                  |classsynopsisinfo" mode="perl"/>
1209   </pre>
1210 </xsl:template>
1211
1212 <xsl:template match="classsynopsisinfo" mode="perl">
1213   <xsl:apply-templates mode="perl"/>
1214 </xsl:template>
1215
1216 <xsl:template match="ooclass|oointerface|ooexception" mode="perl">
1217   <xsl:if test="position() &gt; 1">
1218     <xsl:text>, </xsl:text>
1219   </xsl:if>
1220   <span class="{name(.)}">
1221     <xsl:apply-templates mode="perl"/>
1222   </span>
1223 </xsl:template>
1224
1225 <xsl:template match="modifier" mode="perl">
1226   <span class="{name(.)}">
1227     <xsl:apply-templates mode="perl"/>
1228     <xsl:text>&#160;</xsl:text>
1229   </span>
1230 </xsl:template>
1231
1232 <xsl:template match="classname" mode="perl">
1233   <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
1234     <xsl:text>, </xsl:text>
1235   </xsl:if>
1236   <span class="{name(.)}">
1237     <xsl:apply-templates mode="perl"/>
1238   </span>
1239 </xsl:template>
1240
1241 <xsl:template match="interfacename" mode="perl">
1242   <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
1243     <xsl:text>, </xsl:text>
1244   </xsl:if>
1245   <span class="{name(.)}">
1246     <xsl:apply-templates mode="perl"/>
1247   </span>
1248 </xsl:template>
1249
1250 <xsl:template match="exceptionname" mode="perl">
1251   <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
1252     <xsl:text>, </xsl:text>
1253   </xsl:if>
1254   <span class="{name(.)}">
1255     <xsl:apply-templates mode="perl"/>
1256   </span>
1257 </xsl:template>
1258
1259 <xsl:template match="fieldsynopsis" mode="perl">
1260   <code class="{name(.)}">
1261     <xsl:if test="parent::classsynopsis">
1262       <xsl:text>&#160;&#160;</xsl:text>
1263     </xsl:if>
1264     <xsl:apply-templates mode="perl"/>
1265     <xsl:text>;</xsl:text>
1266   </code>
1267   <xsl:call-template name="synop-break"/>
1268 </xsl:template>
1269
1270 <xsl:template match="type" mode="perl">
1271   <span class="{name(.)}">
1272     <xsl:apply-templates mode="perl"/>
1273     <xsl:text>&#160;</xsl:text>
1274   </span>
1275 </xsl:template>
1276
1277 <xsl:template match="varname" mode="perl">
1278   <span class="{name(.)}">
1279     <xsl:apply-templates mode="perl"/>
1280     <xsl:text>&#160;</xsl:text>
1281   </span>
1282 </xsl:template>
1283
1284 <xsl:template match="initializer" mode="perl">
1285   <span class="{name(.)}">
1286     <xsl:text>=&#160;</xsl:text>
1287     <xsl:apply-templates mode="perl"/>
1288   </span>
1289 </xsl:template>
1290
1291 <xsl:template match="void" mode="perl">
1292   <span class="{name(.)}">
1293     <xsl:text>void&#160;</xsl:text>
1294   </span>
1295 </xsl:template>
1296
1297 <xsl:template match="methodname" mode="perl">
1298   <span class="{name(.)}">
1299     <xsl:apply-templates mode="perl"/>
1300   </span>
1301 </xsl:template>
1302
1303 <xsl:template match="methodparam" mode="perl">
1304   <xsl:if test="position() &gt; 1">
1305     <xsl:text>, </xsl:text>
1306   </xsl:if>
1307   <span class="{name(.)}">
1308     <xsl:apply-templates mode="perl"/>
1309   </span>
1310 </xsl:template>
1311
1312 <xsl:template match="parameter" mode="perl">
1313   <span class="{name(.)}">
1314     <xsl:apply-templates mode="perl"/>
1315   </span>
1316 </xsl:template>
1317
1318 <xsl:template mode="perl" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
1319   <xsl:variable name="modifiers" select="modifier"/>
1320   <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
1321
1322   <code class="{name(.)}">
1323     <xsl:text>sub </xsl:text>
1324
1325     <xsl:apply-templates select="methodname" mode="perl"/>
1326     <xsl:text> { ... };</xsl:text>
1327   </code>
1328   <xsl:call-template name="synop-break"/>
1329 </xsl:template>
1330
1331 <!-- ==================================================================== -->
1332
1333 </xsl:stylesheet>