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">
6 <!-- ********************************************************************
8 ********************************************************************
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.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <!-- synopsis is in verbatim -->
20 <!-- ==================================================================== -->
22 <xsl:template match="cmdsynopsis">
23 <div class="{name(.)}">
25 <xsl:call-template name="anchor"/>
26 <xsl:apply-templates/>
31 <xsl:template match="cmdsynopsis/command">
33 <xsl:call-template name="inline.monoseq"/>
34 <xsl:text> </xsl:text>
37 <xsl:template match="cmdsynopsis/command[1]" priority="2">
38 <xsl:call-template name="inline.monoseq"/>
39 <xsl:text> </xsl:text>
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">
47 <xsl:when test="ancestor-or-self::*/@sepchar">
48 <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
51 <xsl:text> </xsl:text>
55 <xsl:if test="position()>1"><xsl:value-of select="$sepchar"/></xsl:if>
57 <xsl:when test="$choice='plain'">
58 <xsl:value-of select="$arg.choice.plain.open.str"/>
60 <xsl:when test="$choice='req'">
61 <xsl:value-of select="$arg.choice.req.open.str"/>
63 <xsl:when test="$choice='opt'">
64 <xsl:value-of select="$arg.choice.opt.open.str"/>
67 <xsl:value-of select="$arg.choice.def.open.str"/>
70 <xsl:apply-templates/>
72 <xsl:when test="$rep='repeat'">
73 <xsl:value-of select="$arg.rep.repeat.str"/>
75 <xsl:when test="$rep='norepeat'">
76 <xsl:value-of select="$arg.rep.norepeat.str"/>
79 <xsl:value-of select="$arg.rep.def.str"/>
83 <xsl:when test="$choice='plain'">
84 <xsl:value-of select="$arg.choice.plain.close.str"/>
86 <xsl:when test="$choice='req'">
87 <xsl:value-of select="$arg.choice.req.close.str"/>
89 <xsl:when test="$choice='opt'">
90 <xsl:value-of select="$arg.choice.opt.close.str"/>
93 <xsl:value-of select="$arg.choice.def.close.str"/>
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()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
102 <xsl:call-template name="group-or-arg"/>
105 <xsl:template match="sbr">
109 <!-- ==================================================================== -->
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"/>
117 <a href="#{@linkend}">
118 <xsl:text>(</xsl:text>
119 <xsl:value-of select="$snum"/>
120 <xsl:text>)</xsl:text>
122 <xsl:text> </xsl:text>
123 <xsl:apply-templates/>
127 <xsl:template match="synopfragment" mode="synopfragment.number">
128 <xsl:number format="1"/>
131 <xsl:template match="synopfragment">
132 <xsl:variable name="snum">
133 <xsl:apply-templates select="." mode="synopfragment.number"/>
137 <xsl:text>(</xsl:text>
138 <xsl:value-of select="$snum"/>
139 <xsl:text>)</xsl:text>
141 <xsl:text> </xsl:text>
142 <xsl:apply-templates/>
146 <xsl:template match="funcsynopsis">
147 <xsl:call-template name="informal.object"/>
150 <xsl:template match="funcsynopsisinfo">
151 <pre class="{name(.)}"><xsl:apply-templates/></pre>
154 <!-- ====================================================================== -->
155 <!-- funcprototype -->
158 funcprototype ::= (funcdef,
159 (void|varargs|paramdef+))
161 funcdef ::= (#PCDATA|type|replaceable|function)*
163 paramdef ::= (#PCDATA|type|replaceable|parameter|funcparams)*
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'"/>
174 <xsl:variable name="style">
176 <xsl:when test="$html-style != ''">
177 <xsl:value-of select="$html-style"/>
180 <xsl:value-of select="$funcsynopsis.style"/>
185 <xsl:variable name="tabular-p" select="$funcsynopsis.tabular.threshold > 0 and string-length(.) > $funcsynopsis.tabular.threshold"/>
188 <xsl:when test="$style = 'kr' and $tabular-p">
189 <xsl:apply-templates select="." mode="kr-tabular"/>
191 <xsl:when test="$style = 'kr'">
192 <xsl:apply-templates select="." mode="kr-nontabular"/>
194 <xsl:when test="$style = 'ansi' and $tabular-p">
195 <xsl:apply-templates select="." mode="ansi-tabular"/>
198 <xsl:apply-templates select="." mode="ansi-nontabular"/>
203 <!-- ====================================================================== -->
204 <!-- funcprototype: kr, non-tabular -->
206 <xsl:template match="funcprototype" mode="kr-nontabular">
208 <xsl:apply-templates mode="kr-nontabular"/>
209 <xsl:if test="paramdef">
211 <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
216 <xsl:template match="funcdef" mode="kr-nontabular">
217 <code class="{name(.)}">
218 <xsl:apply-templates mode="kr-nontabular"/>
219 <xsl:text>(</xsl:text>
223 <xsl:template match="funcdef/function" mode="kr-nontabular">
225 <xsl:when test="$funcsynopsis.decoration != 0">
226 <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
229 <xsl:apply-templates mode="kr-nontabular"/>
234 <xsl:template match="void" mode="kr-nontabular">
236 <xsl:text>;</xsl:text>
239 <xsl:template match="varargs" mode="kr-nontabular">
240 <xsl:text>...</xsl:text>
242 <xsl:text>;</xsl:text>
245 <xsl:template match="paramdef" mode="kr-nontabular">
246 <xsl:apply-templates select="parameter" mode="kr-nontabular"/>
248 <xsl:when test="following-sibling::*">
249 <xsl:text>, </xsl:text>
253 <xsl:text>;</xsl:text>
258 <xsl:template match="paramdef/parameter" mode="kr-nontabular">
260 <xsl:when test="$funcsynopsis.decoration != 0">
261 <var class="pdparam">
262 <xsl:apply-templates mode="kr-nontabular"/>
266 <xsl:apply-templates mode="kr-nontabular"/>
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>
277 <xsl:template match="paramdef/parameter" mode="kr-funcsynopsis-mode">
279 <xsl:when test="$funcsynopsis.decoration != 0">
280 <var class="pdparam">
281 <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
285 <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
290 <xsl:template match="funcparams" mode="kr-funcsynopsis-mode">
292 <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
294 <xsl:text>;</xsl:text>
297 <!-- ====================================================================== -->
298 <!-- funcprototype: kr, tabular -->
300 <xsl:template match="funcprototype" mode="kr-tabular">
301 <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
304 <xsl:apply-templates select="funcdef" mode="kr-tabular"/>
306 <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
308 <xsl:for-each select="(void|varargs|paramdef)[position() > 1]">
311 <xsl:apply-templates select="." mode="kr-tabular"/>
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>
320 <xsl:apply-templates select="paramdef" mode="kr-tabular-funcsynopsis-mode"/>
325 <xsl:template match="funcdef" mode="kr-tabular">
326 <code class="{name(.)}">
327 <xsl:apply-templates mode="kr-tabular"/>
328 <xsl:text>(</xsl:text>
332 <xsl:template match="funcdef/function" mode="kr-tabular">
334 <xsl:when test="$funcsynopsis.decoration != 0">
335 <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
338 <xsl:apply-templates mode="kr-tabular"/>
343 <xsl:template match="void" mode="kr-tabular">
346 <xsl:text>;</xsl:text>
351 <xsl:template match="varargs" mode="kr-tabular">
353 <xsl:text>...</xsl:text>
355 <xsl:text>;</xsl:text>
360 <xsl:template match="paramdef" mode="kr-tabular">
362 <xsl:apply-templates select="parameter" mode="kr-tabular"/>
364 <xsl:when test="following-sibling::*">
365 <xsl:text>, </xsl:text>
369 <xsl:text>;</xsl:text>
376 <xsl:template match="paramdef/parameter" mode="kr-tabular">
378 <xsl:when test="$funcsynopsis.decoration != 0">
379 <var class="pdparam">
380 <xsl:apply-templates mode="kr-tabular"/>
384 <xsl:apply-templates mode="kr-tabular"/>
389 <xsl:template match="paramdef" mode="kr-tabular-funcsynopsis-mode">
392 <xsl:when test="type and funcparams">
394 <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
395 <xsl:text> </xsl:text>
398 <xsl:apply-templates select="type/following-sibling::node()" mode="kr-tabular-funcsynopsis-mode"/>
401 <xsl:when test="funcparams">
403 <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
408 <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="kr-tabular-funcsynopsis-mode"/>
409 <xsl:text> </xsl:text>
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>
421 <xsl:template match="paramdef/parameter" mode="kr-tabular-funcsynopsis-mode">
423 <xsl:when test="$funcsynopsis.decoration != 0">
424 <var class="pdparam">
425 <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
429 <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
434 <xsl:template match="funcparams" mode="kr-tabular-funcsynopsis-mode">
436 <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
438 <xsl:text>;</xsl:text>
441 <!-- ====================================================================== -->
442 <!-- funcprototype: ansi, non-tabular -->
444 <xsl:template match="funcprototype" mode="ansi-nontabular">
446 <xsl:apply-templates mode="ansi-nontabular"/>
450 <xsl:template match="funcdef" mode="ansi-nontabular">
451 <code class="{name(.)}">
452 <xsl:apply-templates mode="ansi-nontabular"/>
453 <xsl:text>(</xsl:text>
457 <xsl:template match="funcdef/function" mode="ansi-nontabular">
459 <xsl:when test="$funcsynopsis.decoration != 0">
460 <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
463 <xsl:apply-templates mode="ansi-nontabular"/>
468 <xsl:template match="void" mode="ansi-nontabular">
470 <xsl:text>;</xsl:text>
473 <xsl:template match="varargs" mode="ansi-nontabular">
474 <xsl:text>...</xsl:text>
476 <xsl:text>;</xsl:text>
479 <xsl:template match="paramdef" mode="ansi-nontabular">
480 <xsl:apply-templates mode="ansi-nontabular"/>
482 <xsl:when test="following-sibling::*">
483 <xsl:text>, </xsl:text>
487 <xsl:text>;</xsl:text>
492 <xsl:template match="paramdef/parameter" mode="ansi-nontabular">
494 <xsl:when test="$funcsynopsis.decoration != 0">
495 <var class="pdparam">
496 <xsl:apply-templates mode="ansi-nontabular"/>
500 <xsl:apply-templates mode="ansi-nontabular"/>
505 <xsl:template match="funcparams" mode="ansi-nontabular">
507 <xsl:apply-templates mode="ansi-nontabular"/>
511 <!-- ====================================================================== -->
512 <!-- funcprototype: ansi, tabular -->
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>
521 <xsl:apply-templates select="funcdef" mode="ansi-tabular"/>
523 <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
525 <xsl:for-each select="(void|varargs|paramdef)[position() > 1]">
528 <xsl:apply-templates select="." mode="ansi-tabular"/>
534 <xsl:template match="funcdef" mode="ansi-tabular">
535 <code class="{name(.)}">
536 <xsl:apply-templates mode="ansi-tabular"/>
537 <xsl:text>(</xsl:text>
541 <xsl:template match="funcdef/function" mode="ansi-tabular">
543 <xsl:when test="$funcsynopsis.decoration != 0">
544 <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
547 <xsl:apply-templates mode="kr-tabular"/>
552 <xsl:template match="void" mode="ansi-tabular">
555 <xsl:text>;</xsl:text>
560 <xsl:template match="varargs" mode="ansi-tabular">
562 <xsl:text>...</xsl:text>
564 <xsl:text>;</xsl:text>
569 <xsl:template match="paramdef" mode="ansi-tabular">
571 <xsl:when test="type and funcparams">
573 <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
574 <xsl:text> </xsl:text>
577 <xsl:apply-templates select="type/following-sibling::node()" mode="kr-tabular-funcsynopsis-mode"/>
582 <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="ansi-tabular"/>
583 <xsl:text> </xsl:text>
586 <xsl:apply-templates select="parameter" mode="ansi-tabular"/>
587 <xsl:apply-templates select="parameter/following-sibling::node()[not(self::parameter)]" mode="ansi-tabular"/>
589 <xsl:when test="following-sibling::*">
590 <xsl:text>, </xsl:text>
594 <xsl:text>;</xsl:text>
602 <xsl:template match="paramdef/parameter" mode="ansi-tabular">
604 <xsl:when test="$funcsynopsis.decoration != 0">
605 <var class="pdparam">
606 <xsl:apply-templates mode="ansi-tabular"/>
610 <xsl:apply-templates mode="ansi-tabular"/>
615 <xsl:template match="funcparams" mode="ansi-tabular">
617 <xsl:apply-templates/>
621 <!-- ====================================================================== -->
623 <xsl:variable name="default-classsynopsis-language">java</xsl:variable>
625 <xsl:template match="classsynopsis |fieldsynopsis |methodsynopsis |constructorsynopsis |destructorsynopsis">
626 <xsl:param name="language">
628 <xsl:when test="@language">
629 <xsl:value-of select="@language"/>
632 <xsl:value-of select="$default-classsynopsis-language"/>
638 <xsl:when test="$language='java'">
639 <xsl:apply-templates select="." mode="java"/>
641 <xsl:when test="$language='perl'">
642 <xsl:apply-templates select="." mode="perl"/>
644 <xsl:when test="$language='idl'">
645 <xsl:apply-templates select="." mode="idl"/>
647 <xsl:when test="$language='cpp'">
648 <xsl:apply-templates select="." mode="cpp"/>
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"/>
657 <xsl:apply-templates select=".">
658 <xsl:with-param name="language" select="$default-classsynopsis-language"/>
659 </xsl:apply-templates>
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)">
671 <!-- ===== Java ======================================================== -->
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() > 1]">
677 <xsl:text> extends</xsl:text>
678 <xsl:apply-templates select="ooclass[position() > 1]" mode="java"/>
679 <xsl:if test="oointerface|ooexception">
681 <xsl:text>    </xsl:text>
684 <xsl:if test="oointerface">
685 <xsl:text>implements</xsl:text>
686 <xsl:apply-templates select="oointerface" mode="java"/>
687 <xsl:if test="ooexception">
689 <xsl:text>    </xsl:text>
692 <xsl:if test="ooexception">
693 <xsl:text>throws</xsl:text>
694 <xsl:apply-templates select="ooexception" mode="java"/>
696 <xsl:text> {</xsl:text>
698 <xsl:apply-templates select="constructorsynopsis |destructorsynopsis |fieldsynopsis |methodsynopsis |classsynopsisinfo" mode="java"/>
699 <xsl:text>}</xsl:text>
703 <xsl:template match="classsynopsisinfo" mode="java">
704 <xsl:apply-templates mode="java"/>
707 <xsl:template match="ooclass|oointerface|ooexception" mode="java">
709 <xsl:when test="position() > 1">
710 <xsl:text>, </xsl:text>
713 <xsl:text> </xsl:text>
716 <span class="{name(.)}">
717 <xsl:apply-templates mode="java"/>
721 <xsl:template match="modifier" mode="java">
722 <span class="{name(.)}">
723 <xsl:apply-templates mode="java"/>
724 <xsl:text> </xsl:text>
728 <xsl:template match="classname" mode="java">
729 <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
730 <xsl:text>, </xsl:text>
732 <span class="{name(.)}">
733 <xsl:apply-templates mode="java"/>
737 <xsl:template match="interfacename" mode="java">
738 <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
739 <xsl:text>, </xsl:text>
741 <span class="{name(.)}">
742 <xsl:apply-templates mode="java"/>
746 <xsl:template match="exceptionname" mode="java">
747 <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
748 <xsl:text>, </xsl:text>
750 <span class="{name(.)}">
751 <xsl:apply-templates mode="java"/>
755 <xsl:template match="fieldsynopsis" mode="java">
756 <code class="{name(.)}">
757 <xsl:if test="parent::classsynopsis">
758 <xsl:text>  </xsl:text>
760 <xsl:apply-templates mode="java"/>
761 <xsl:text>;</xsl:text>
763 <xsl:call-template name="synop-break"/>
766 <xsl:template match="type" mode="java">
767 <span class="{name(.)}">
768 <xsl:apply-templates mode="java"/>
769 <xsl:text> </xsl:text>
773 <xsl:template match="varname" mode="java">
774 <span class="{name(.)}">
775 <xsl:apply-templates mode="java"/>
776 <xsl:text> </xsl:text>
780 <xsl:template match="initializer" mode="java">
781 <span class="{name(.)}">
782 <xsl:text>= </xsl:text>
783 <xsl:apply-templates mode="java"/>
787 <xsl:template match="void" mode="java">
788 <span class="{name(.)}">
789 <xsl:text>void </xsl:text>
793 <xsl:template match="methodname" mode="java">
794 <span class="{name(.)}">
795 <xsl:apply-templates mode="java"/>
799 <xsl:template match="methodparam" mode="java">
800 <xsl:param name="indent">0</xsl:param>
801 <xsl:if test="position() > 1">
802 <xsl:text>,</xsl:text>
804 <xsl:if test="$indent > 0">
805 <xsl:call-template name="copy-string">
806 <xsl:with-param name="string"> </xsl:with-param>
807 <xsl:with-param name="count" select="$indent + 1"/>
811 <span class="{name(.)}">
812 <xsl:apply-templates mode="java"/>
816 <xsl:template match="parameter" mode="java">
817 <span class="{name(.)}">
818 <xsl:apply-templates mode="java"/>
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>  </xsl:text>
829 <xsl:apply-templates select="$modifiers" mode="java"/>
832 <xsl:if test="name($notmod[1]) != 'methodname'">
833 <xsl:apply-templates select="$notmod[1]" mode="java"/>
836 <xsl:apply-templates select="methodname" mode="java"/>
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">
848 <xsl:text>    throws </xsl:text>
849 <xsl:apply-templates select="exceptionname" mode="java"/>
851 <xsl:text>;</xsl:text>
853 <xsl:call-template name="synop-break"/>
856 <!-- ===== C++ ========================================================= -->
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() > 1]">
862 <xsl:text>: </xsl:text>
863 <xsl:apply-templates select="ooclass[position() > 1]" mode="cpp"/>
864 <xsl:if test="oointerface|ooexception">
866 <xsl:text>    </xsl:text>
869 <xsl:if test="oointerface">
870 <xsl:text> implements</xsl:text>
871 <xsl:apply-templates select="oointerface" mode="cpp"/>
872 <xsl:if test="ooexception">
874 <xsl:text>    </xsl:text>
877 <xsl:if test="ooexception">
878 <xsl:text> throws</xsl:text>
879 <xsl:apply-templates select="ooexception" mode="cpp"/>
881 <xsl:text> {</xsl:text>
883 <xsl:apply-templates select="constructorsynopsis |destructorsynopsis |fieldsynopsis |methodsynopsis |classsynopsisinfo" mode="cpp"/>
884 <xsl:text>}</xsl:text>
888 <xsl:template match="classsynopsisinfo" mode="cpp">
889 <xsl:apply-templates mode="cpp"/>
892 <xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
893 <xsl:if test="position() > 1">
894 <xsl:text>, </xsl:text>
896 <span class="{name(.)}">
897 <xsl:apply-templates mode="cpp"/>
901 <xsl:template match="modifier" mode="cpp">
902 <span class="{name(.)}">
903 <xsl:apply-templates mode="cpp"/>
904 <xsl:text> </xsl:text>
908 <xsl:template match="classname" mode="cpp">
909 <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
910 <xsl:text>, </xsl:text>
912 <span class="{name(.)}">
913 <xsl:apply-templates mode="cpp"/>
917 <xsl:template match="interfacename" mode="cpp">
918 <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
919 <xsl:text>, </xsl:text>
921 <span class="{name(.)}">
922 <xsl:apply-templates mode="cpp"/>
926 <xsl:template match="exceptionname" mode="cpp">
927 <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
928 <xsl:text>, </xsl:text>
930 <span class="{name(.)}">
931 <xsl:apply-templates mode="cpp"/>
935 <xsl:template match="fieldsynopsis" mode="cpp">
936 <code class="{name(.)}">
937 <xsl:if test="parent::classsynopsis">
938 <xsl:text>  </xsl:text>
940 <xsl:apply-templates mode="cpp"/>
941 <xsl:text>;</xsl:text>
943 <xsl:call-template name="synop-break"/>
946 <xsl:template match="type" mode="cpp">
947 <span class="{name(.)}">
948 <xsl:apply-templates mode="cpp"/>
949 <xsl:text> </xsl:text>
953 <xsl:template match="varname" mode="cpp">
954 <span class="{name(.)}">
955 <xsl:apply-templates mode="cpp"/>
956 <xsl:text> </xsl:text>
960 <xsl:template match="initializer" mode="cpp">
961 <span class="{name(.)}">
962 <xsl:text>= </xsl:text>
963 <xsl:apply-templates mode="cpp"/>
967 <xsl:template match="void" mode="cpp">
968 <span class="{name(.)}">
969 <xsl:text>void </xsl:text>
973 <xsl:template match="methodname" mode="cpp">
974 <span class="{name(.)}">
975 <xsl:apply-templates mode="cpp"/>
979 <xsl:template match="methodparam" mode="cpp">
980 <xsl:if test="position() > 1">
981 <xsl:text>, </xsl:text>
983 <span class="{name(.)}">
984 <xsl:apply-templates mode="cpp"/>
988 <xsl:template match="parameter" mode="cpp">
989 <span class="{name(.)}">
990 <xsl:apply-templates mode="cpp"/>
994 <xsl:template mode="cpp" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
995 <xsl:variable name="modifiers" select="modifier"/>
996 <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
998 <code class="{name(.)}">
999 <xsl:if test="parent::classsynopsis">
1000 <xsl:text>  </xsl:text>
1002 <xsl:apply-templates select="$modifiers" mode="cpp"/>
1005 <xsl:if test="name($notmod[1]) != 'methodname'">
1006 <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
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">
1015 <xsl:text>    throws </xsl:text>
1016 <xsl:apply-templates select="exceptionname" mode="cpp"/>
1018 <xsl:text>;</xsl:text>
1020 <xsl:call-template name="synop-break"/>
1023 <!-- ===== IDL ========================================================= -->
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() > 1]">
1030 <xsl:text>: </xsl:text>
1031 <xsl:apply-templates select="ooclass[position() > 1]" mode="idl"/>
1032 <xsl:if test="oointerface|ooexception">
1034 <xsl:text>    </xsl:text>
1037 <xsl:if test="oointerface">
1038 <xsl:text> implements</xsl:text>
1039 <xsl:apply-templates select="oointerface" mode="idl"/>
1040 <xsl:if test="ooexception">
1042 <xsl:text>    </xsl:text>
1045 <xsl:if test="ooexception">
1046 <xsl:text> throws</xsl:text>
1047 <xsl:apply-templates select="ooexception" mode="idl"/>
1049 <xsl:text> {</xsl:text>
1051 <xsl:apply-templates select="constructorsynopsis |destructorsynopsis |fieldsynopsis |methodsynopsis |classsynopsisinfo" mode="idl"/>
1052 <xsl:text>}</xsl:text>
1056 <xsl:template match="classsynopsisinfo" mode="idl">
1057 <xsl:apply-templates mode="idl"/>
1060 <xsl:template match="ooclass|oointerface|ooexception" mode="idl">
1061 <xsl:if test="position() > 1">
1062 <xsl:text>, </xsl:text>
1064 <span class="{name(.)}">
1065 <xsl:apply-templates mode="idl"/>
1069 <xsl:template match="modifier" mode="idl">
1070 <span class="{name(.)}">
1071 <xsl:apply-templates mode="idl"/>
1072 <xsl:text> </xsl:text>
1076 <xsl:template match="classname" mode="idl">
1077 <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
1078 <xsl:text>, </xsl:text>
1080 <span class="{name(.)}">
1081 <xsl:apply-templates mode="idl"/>
1085 <xsl:template match="interfacename" mode="idl">
1086 <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
1087 <xsl:text>, </xsl:text>
1089 <span class="{name(.)}">
1090 <xsl:apply-templates mode="idl"/>
1094 <xsl:template match="exceptionname" mode="idl">
1095 <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
1096 <xsl:text>, </xsl:text>
1098 <span class="{name(.)}">
1099 <xsl:apply-templates mode="idl"/>
1103 <xsl:template match="fieldsynopsis" mode="idl">
1104 <code class="{name(.)}">
1105 <xsl:if test="parent::classsynopsis">
1106 <xsl:text>  </xsl:text>
1108 <xsl:apply-templates mode="idl"/>
1109 <xsl:text>;</xsl:text>
1111 <xsl:call-template name="synop-break"/>
1114 <xsl:template match="type" mode="idl">
1115 <span class="{name(.)}">
1116 <xsl:apply-templates mode="idl"/>
1117 <xsl:text> </xsl:text>
1121 <xsl:template match="varname" mode="idl">
1122 <span class="{name(.)}">
1123 <xsl:apply-templates mode="idl"/>
1124 <xsl:text> </xsl:text>
1128 <xsl:template match="initializer" mode="idl">
1129 <span class="{name(.)}">
1130 <xsl:text>= </xsl:text>
1131 <xsl:apply-templates mode="idl"/>
1135 <xsl:template match="void" mode="idl">
1136 <span class="{name(.)}">
1137 <xsl:text>void </xsl:text>
1141 <xsl:template match="methodname" mode="idl">
1142 <span class="{name(.)}">
1143 <xsl:apply-templates mode="idl"/>
1147 <xsl:template match="methodparam" mode="idl">
1148 <xsl:if test="position() > 1">
1149 <xsl:text>, </xsl:text>
1151 <span class="{name(.)}">
1152 <xsl:apply-templates mode="idl"/>
1156 <xsl:template match="parameter" mode="idl">
1157 <span class="{name(.)}">
1158 <xsl:apply-templates mode="idl"/>
1162 <xsl:template mode="idl" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
1163 <xsl:variable name="modifiers" select="modifier"/>
1164 <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
1166 <code class="{name(.)}">
1167 <xsl:if test="parent::classsynopsis">
1168 <xsl:text>  </xsl:text>
1170 <xsl:apply-templates select="$modifiers" mode="idl"/>
1173 <xsl:if test="name($notmod[1]) != 'methodname'">
1174 <xsl:apply-templates select="$notmod[1]" mode="idl"/>
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">
1183 <xsl:text>    raises(</xsl:text>
1184 <xsl:apply-templates select="exceptionname" mode="idl"/>
1185 <xsl:text>)</xsl:text>
1187 <xsl:text>;</xsl:text>
1189 <xsl:call-template name="synop-break"/>
1192 <!-- ===== Perl ======================================================== -->
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>
1201 <xsl:if test="ooclass[position() > 1]">
1202 <xsl:text>@ISA = (</xsl:text>
1203 <xsl:apply-templates select="ooclass[position() > 1]" mode="perl"/>
1204 <xsl:text>);</xsl:text>
1208 <xsl:apply-templates select="constructorsynopsis |destructorsynopsis |fieldsynopsis |methodsynopsis |classsynopsisinfo" mode="perl"/>
1212 <xsl:template match="classsynopsisinfo" mode="perl">
1213 <xsl:apply-templates mode="perl"/>
1216 <xsl:template match="ooclass|oointerface|ooexception" mode="perl">
1217 <xsl:if test="position() > 1">
1218 <xsl:text>, </xsl:text>
1220 <span class="{name(.)}">
1221 <xsl:apply-templates mode="perl"/>
1225 <xsl:template match="modifier" mode="perl">
1226 <span class="{name(.)}">
1227 <xsl:apply-templates mode="perl"/>
1228 <xsl:text> </xsl:text>
1232 <xsl:template match="classname" mode="perl">
1233 <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
1234 <xsl:text>, </xsl:text>
1236 <span class="{name(.)}">
1237 <xsl:apply-templates mode="perl"/>
1241 <xsl:template match="interfacename" mode="perl">
1242 <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
1243 <xsl:text>, </xsl:text>
1245 <span class="{name(.)}">
1246 <xsl:apply-templates mode="perl"/>
1250 <xsl:template match="exceptionname" mode="perl">
1251 <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
1252 <xsl:text>, </xsl:text>
1254 <span class="{name(.)}">
1255 <xsl:apply-templates mode="perl"/>
1259 <xsl:template match="fieldsynopsis" mode="perl">
1260 <code class="{name(.)}">
1261 <xsl:if test="parent::classsynopsis">
1262 <xsl:text>  </xsl:text>
1264 <xsl:apply-templates mode="perl"/>
1265 <xsl:text>;</xsl:text>
1267 <xsl:call-template name="synop-break"/>
1270 <xsl:template match="type" mode="perl">
1271 <span class="{name(.)}">
1272 <xsl:apply-templates mode="perl"/>
1273 <xsl:text> </xsl:text>
1277 <xsl:template match="varname" mode="perl">
1278 <span class="{name(.)}">
1279 <xsl:apply-templates mode="perl"/>
1280 <xsl:text> </xsl:text>
1284 <xsl:template match="initializer" mode="perl">
1285 <span class="{name(.)}">
1286 <xsl:text>= </xsl:text>
1287 <xsl:apply-templates mode="perl"/>
1291 <xsl:template match="void" mode="perl">
1292 <span class="{name(.)}">
1293 <xsl:text>void </xsl:text>
1297 <xsl:template match="methodname" mode="perl">
1298 <span class="{name(.)}">
1299 <xsl:apply-templates mode="perl"/>
1303 <xsl:template match="methodparam" mode="perl">
1304 <xsl:if test="position() > 1">
1305 <xsl:text>, </xsl:text>
1307 <span class="{name(.)}">
1308 <xsl:apply-templates mode="perl"/>
1312 <xsl:template match="parameter" mode="perl">
1313 <span class="{name(.)}">
1314 <xsl:apply-templates mode="perl"/>
1318 <xsl:template mode="perl" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
1319 <xsl:variable name="modifiers" select="modifier"/>
1320 <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
1322 <code class="{name(.)}">
1323 <xsl:text>sub </xsl:text>
1325 <xsl:apply-templates select="methodname" mode="perl"/>
1326 <xsl:text> { ... };</xsl:text>
1328 <xsl:call-template name="synop-break"/>
1331 <!-- ==================================================================== -->