12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532 |
- <?xml version="1.0" encoding="ASCII"?>
- <!--This file was created automatically by html2xhtml-->
- <!--from the HTML stylesheets.-->
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
- <!-- ********************************************************************
- $Id$
- ********************************************************************
- This file is part of the XSL DocBook Stylesheet distribution.
- See ../README or http://docbook.sf.net/release/xsl/current/ for
- copyright and other information.
- ******************************************************************** -->
- <!-- ==================================================================== -->
- <!-- synopsis is in verbatim -->
- <!-- ==================================================================== -->
- <xsl:template match="cmdsynopsis">
- <div>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <p>
- <xsl:call-template name="anchor">
- <xsl:with-param name="conditional" select="0"/>
- </xsl:call-template>
- <xsl:apply-templates/>
- </p>
- </div>
- </xsl:template>
- <xsl:template match="cmdsynopsis/command">
- <br/>
- <xsl:call-template name="inline.monoseq"/>
- <xsl:text> </xsl:text>
- </xsl:template>
- <xsl:template match="cmdsynopsis/command[1]" priority="2">
- <xsl:call-template name="inline.monoseq"/>
- <xsl:text> </xsl:text>
- </xsl:template>
- <xsl:template match="group|arg" name="group-or-arg">
- <xsl:variable name="choice" select="@choice"/>
- <xsl:variable name="rep" select="@rep"/>
- <xsl:variable name="sepchar">
- <xsl:choose>
- <xsl:when test="ancestor-or-self::*/@sepchar">
- <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="preceding-sibling::*">
- <xsl:value-of select="$sepchar"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$choice='plain'">
- <xsl:value-of select="$arg.choice.plain.open.str"/>
- </xsl:when>
- <xsl:when test="$choice='req'">
- <xsl:value-of select="$arg.choice.req.open.str"/>
- </xsl:when>
- <xsl:when test="$choice='opt'">
- <xsl:value-of select="$arg.choice.opt.open.str"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$arg.choice.def.open.str"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates/>
- <xsl:choose>
- <xsl:when test="$rep='repeat'">
- <xsl:value-of select="$arg.rep.repeat.str"/>
- </xsl:when>
- <xsl:when test="$rep='norepeat'">
- <xsl:value-of select="$arg.rep.norepeat.str"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$arg.rep.def.str"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="$choice='plain'">
- <xsl:value-of select="$arg.choice.plain.close.str"/>
- </xsl:when>
- <xsl:when test="$choice='req'">
- <xsl:value-of select="$arg.choice.req.close.str"/>
- </xsl:when>
- <xsl:when test="$choice='opt'">
- <xsl:value-of select="$arg.choice.opt.close.str"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$arg.choice.def.close.str"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="group/arg">
- <xsl:variable name="choice" select="@choice"/>
- <xsl:variable name="rep" select="@rep"/>
- <xsl:if test="preceding-sibling::*">
- <xsl:value-of select="$arg.or.sep"/>
- </xsl:if>
- <xsl:call-template name="group-or-arg"/>
- </xsl:template>
- <xsl:template match="sbr">
- <br/>
- </xsl:template>
- <!-- ==================================================================== -->
- <xsl:template match="synopfragmentref">
- <xsl:variable name="target" select="key('id',@linkend)"/>
- <xsl:variable name="snum">
- <xsl:apply-templates select="$target" mode="synopfragment.number"/>
- </xsl:variable>
- <i>
- <a href="#{@linkend}">
- <xsl:text>(</xsl:text>
- <xsl:value-of select="$snum"/>
- <xsl:text>)</xsl:text>
- </a>
- <xsl:text> </xsl:text>
- <xsl:apply-templates/>
- </i>
- </xsl:template>
- <xsl:template match="synopfragment" mode="synopfragment.number">
- <xsl:number format="1"/>
- </xsl:template>
- <xsl:template match="synopfragment">
- <xsl:variable name="snum">
- <xsl:apply-templates select="." mode="synopfragment.number"/>
- </xsl:variable>
- <p>
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <a id="{$id}">
- <xsl:text>(</xsl:text>
- <xsl:value-of select="$snum"/>
- <xsl:text>)</xsl:text>
- </a>
- <xsl:text> </xsl:text>
- <xsl:apply-templates/>
- </p>
- </xsl:template>
- <xsl:template match="funcsynopsis">
- <xsl:call-template name="informal.object"/>
- </xsl:template>
- <xsl:template match="funcsynopsisinfo">
- <pre>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates/>
- </pre>
- </xsl:template>
- <!-- ====================================================================== -->
- <!-- funcprototype -->
- <!--
- funcprototype ::= (funcdef,
- (void|varargs|paramdef+))
- funcdef ::= (#PCDATA|type|replaceable|function)*
- paramdef ::= (#PCDATA|type|replaceable|parameter|funcparams)*
- -->
- <xsl:template match="funcprototype">
- <xsl:variable name="html-style">
- <xsl:call-template name="pi.dbhtml_funcsynopsis-style">
- <xsl:with-param name="node" select="ancestor::funcsynopsis/descendant-or-self::*"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="style">
- <xsl:choose>
- <xsl:when test="$html-style != ''">
- <xsl:value-of select="$html-style"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$funcsynopsis.style"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!--
- <xsl:variable name="tabular-p"
- select="$funcsynopsis.tabular.threshold > 0
- and string-length(.) > $funcsynopsis.tabular.threshold"/>
- -->
- <xsl:variable name="tabular-p" select="true()"/>
- <xsl:choose>
- <xsl:when test="$style = 'kr' and $tabular-p">
- <xsl:apply-templates select="." mode="kr-tabular"/>
- </xsl:when>
- <xsl:when test="$style = 'kr'">
- <xsl:apply-templates select="." mode="kr-nontabular"/>
- </xsl:when>
- <xsl:when test="$style = 'ansi' and $tabular-p">
- <xsl:apply-templates select="." mode="ansi-tabular"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="ansi-nontabular"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- ====================================================================== -->
- <!-- funcprototype: kr, non-tabular -->
- <xsl:template match="funcprototype" mode="kr-nontabular">
- <p>
- <xsl:apply-templates mode="kr-nontabular"/>
- <xsl:if test="paramdef">
- <br/>
- <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
- </xsl:if>
- </p>
- </xsl:template>
- <xsl:template match="funcdef" mode="kr-nontabular">
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="kr-nontabular"/>
- <xsl:text>(</xsl:text>
- </code>
- </xsl:template>
- <xsl:template match="funcdef/function" mode="kr-nontabular">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="kr-nontabular"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="void" mode="kr-nontabular">
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:template>
- <xsl:template match="varargs" mode="kr-nontabular">
- <xsl:text>...</xsl:text>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:template>
- <xsl:template match="paramdef" mode="kr-nontabular">
- <xsl:apply-templates select="parameter" mode="kr-nontabular"/>
- <xsl:choose>
- <xsl:when test="following-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="paramdef/parameter" mode="kr-nontabular">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <var class="pdparam">
- <xsl:apply-templates mode="kr-nontabular"/>
- </var>
- </xsl:when>
- <xsl:otherwise>
- <code>
- <xsl:apply-templates mode="kr-nontabular"/>
- </code>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
- <xsl:if test="preceding-sibling::paramdef"><br/></xsl:if>
- <code>
- <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
- </code>
- <xsl:text>;</xsl:text>
- </xsl:template>
- <xsl:template match="paramdef/parameter" mode="kr-funcsynopsis-mode">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <var class="pdparam">
- <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
- </var>
- </xsl:when>
- <xsl:otherwise>
- <code>
- <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
- </code>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="funcparams" mode="kr-funcsynopsis-mode">
- <code>(</code>
- <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
- <code>)</code>
- </xsl:template>
- <!-- ====================================================================== -->
- <!-- funcprototype: kr, tabular -->
- <xsl:template match="funcprototype" mode="kr-tabular">
- <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" style="padding-bottom: 1em">
- <tr>
- <td>
- <xsl:apply-templates select="funcdef" mode="kr-tabular"/>
- </td>
- <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
- </tr>
- <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*[not(self::funcdef)]]">
- <tr>
- <td> </td>
- <xsl:apply-templates select="." mode="kr-tabular"/>
- </tr>
- </xsl:for-each>
- </table>
- <xsl:if test="paramdef">
- <table border="0" summary="Function argument synopsis" cellspacing="0" cellpadding="0">
- <xsl:if test="following-sibling::funcprototype">
- <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates select="paramdef" mode="kr-tabular-funcsynopsis-mode"/>
- </table>
- </xsl:if>
- </xsl:template>
- <xsl:template match="funcdef" mode="kr-tabular">
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="kr-tabular"/>
- <xsl:text>(</xsl:text>
- </code>
- </xsl:template>
- <xsl:template match="funcdef/function" mode="kr-tabular">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="kr-tabular"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="void" mode="kr-tabular">
- <td>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </td>
- <td> </td>
- </xsl:template>
- <xsl:template match="varargs" mode="kr-tabular">
- <td>
- <xsl:text>...</xsl:text>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </td>
- <td> </td>
- </xsl:template>
- <xsl:template match="paramdef" mode="kr-tabular">
- <td>
- <xsl:apply-templates select="parameter" mode="kr-tabular"/>
- <xsl:choose>
- <xsl:when test="following-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <td> </td>
- </xsl:template>
- <xsl:template match="paramdef/parameter" mode="kr-tabular">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <var class="pdparam">
- <xsl:apply-templates mode="kr-tabular"/>
- </var>
- </xsl:when>
- <xsl:otherwise>
- <code>
- <xsl:apply-templates mode="kr-tabular"/>
- </code>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="paramdef" mode="kr-tabular-funcsynopsis-mode">
- <xsl:variable name="type">
- <xsl:choose>
- <xsl:when test="type">
- <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
- </xsl:when>
- <xsl:when test="normalize-space(parameter/preceding-sibling::node()[not(self::parameter)]) != ''">
- <xsl:copy-of select="parameter/preceding-sibling::node()[not(self::parameter)]"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <tr>
- <xsl:choose>
- <xsl:when test="$type != '' and funcparams">
- <td>
- <code>
- <xsl:copy-of select="$type"/>
- </code>
- <xsl:text> </xsl:text>
- </td>
- <td>
- <code>
- <xsl:choose>
- <xsl:when test="type">
- <xsl:apply-templates select="type/following-sibling::*" mode="kr-tabular-funcsynopsis-mode"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="*" mode="kr-tabular-funcsynopsis-mode"/>
- </xsl:otherwise>
- </xsl:choose>
- </code>
- </td>
- </xsl:when>
- <xsl:when test="funcparams">
- <td colspan="2">
- <code>
- <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
- </code>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td>
- <code>
- <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="kr-tabular-funcsynopsis-mode"/>
- </code>
- <xsl:text> </xsl:text>
- </td>
- <td>
- <code>
- <xsl:apply-templates select="parameter" mode="kr-tabular"/>
- <xsl:apply-templates select="parameter/following-sibling::*[not(self::parameter)]" mode="kr-tabular-funcsynopsis-mode"/>
- <xsl:text>;</xsl:text>
- </code>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- </tr>
- </xsl:template>
- <xsl:template match="paramdef/parameter" mode="kr-tabular-funcsynopsis-mode">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <var class="pdparam">
- <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
- </var>
- </xsl:when>
- <xsl:otherwise>
- <code>
- <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
- </code>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="funcparams" mode="kr-tabular-funcsynopsis-mode">
- <code>(</code>
- <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:template>
- <!-- ====================================================================== -->
- <!-- funcprototype: ansi, non-tabular -->
- <xsl:template match="funcprototype" mode="ansi-nontabular">
- <p>
- <xsl:apply-templates mode="ansi-nontabular"/>
- </p>
- </xsl:template>
- <xsl:template match="funcdef" mode="ansi-nontabular">
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="ansi-nontabular"/>
- <xsl:text>(</xsl:text>
- </code>
- </xsl:template>
- <xsl:template match="funcdef/function" mode="ansi-nontabular">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="ansi-nontabular"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="void" mode="ansi-nontabular">
- <code>void)</code>
- <xsl:text>;</xsl:text>
- </xsl:template>
- <xsl:template match="varargs" mode="ansi-nontabular">
- <xsl:text>...</xsl:text>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:template>
- <xsl:template match="paramdef" mode="ansi-nontabular">
- <xsl:apply-templates mode="ansi-nontabular"/>
- <xsl:choose>
- <xsl:when test="following-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="paramdef/parameter" mode="ansi-nontabular">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <var class="pdparam">
- <xsl:apply-templates mode="ansi-nontabular"/>
- </var>
- </xsl:when>
- <xsl:otherwise>
- <code>
- <xsl:apply-templates mode="ansi-nontabular"/>
- </code>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="funcparams" mode="ansi-nontabular">
- <code>(</code>
- <xsl:apply-templates mode="ansi-nontabular"/>
- <code>)</code>
- </xsl:template>
- <!-- ====================================================================== -->
- <!-- funcprototype: ansi, tabular -->
- <xsl:template match="funcprototype" mode="ansi-tabular">
- <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
- <xsl:if test="following-sibling::funcprototype">
- <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
- </xsl:if>
- <tr>
- <td>
- <xsl:apply-templates select="funcdef" mode="ansi-tabular"/>
- </td>
- <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
- </tr>
- <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*[not(self::funcdef)]]">
- <tr>
- <td> </td>
- <xsl:apply-templates select="." mode="ansi-tabular"/>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:template>
- <xsl:template match="funcdef" mode="ansi-tabular">
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="ansi-tabular"/>
- <xsl:text>(</xsl:text>
- </code>
- </xsl:template>
- <xsl:template match="funcdef/function" mode="ansi-tabular">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="kr-tabular"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="void" mode="ansi-tabular">
- <td>
- <code>void)</code>
- <xsl:text>;</xsl:text>
- </td>
- <td> </td>
- </xsl:template>
- <xsl:template match="varargs" mode="ansi-tabular">
- <td>
- <xsl:text>...</xsl:text>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </td>
- <td> </td>
- </xsl:template>
- <xsl:template match="paramdef" mode="ansi-tabular">
- <xsl:variable name="type">
- <xsl:choose>
- <xsl:when test="type">
- <xsl:apply-templates select="type" mode="ansi-tabular"/>
- </xsl:when>
- <xsl:when test="normalize-space(parameter/preceding-sibling::node()[not(self::parameter)]) != ''">
- <xsl:copy-of select="parameter/preceding-sibling::node()[not(self::parameter)]"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$type != '' and funcparams">
- <td>
- <xsl:copy-of select="$type"/>
- <xsl:text> </xsl:text>
- </td>
- <td>
- <xsl:choose>
- <xsl:when test="type">
- <xsl:apply-templates select="type/following-sibling::*" mode="ansi-tabular"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="*" mode="ansi-tabular"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="following-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td>
- <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="ansi-tabular"/>
- <xsl:text> </xsl:text>
- </td>
- <td>
- <xsl:apply-templates select="parameter" mode="ansi-tabular"/>
- <xsl:apply-templates select="parameter/following-sibling::*[not(self::parameter)]" mode="ansi-tabular"/>
- <xsl:choose>
- <xsl:when test="following-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <code>)</code>
- <xsl:text>;</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="paramdef/parameter" mode="ansi-tabular">
- <xsl:choose>
- <xsl:when test="$funcsynopsis.decoration != 0">
- <var class="pdparam">
- <xsl:apply-templates mode="ansi-tabular"/>
- </var>
- </xsl:when>
- <xsl:otherwise>
- <code>
- <xsl:apply-templates mode="ansi-tabular"/>
- </code>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="funcparams" mode="ansi-tabular">
- <code>(</code>
- <xsl:apply-templates/>
- <code>)</code>
- </xsl:template>
- <!-- ====================================================================== -->
- <xsl:variable name="default-classsynopsis-language">java</xsl:variable>
- <xsl:template match="classsynopsis |fieldsynopsis |methodsynopsis |constructorsynopsis |destructorsynopsis">
- <xsl:param name="language">
- <xsl:choose>
- <xsl:when test="@language">
- <xsl:value-of select="@language"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$default-classsynopsis-language"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:param>
- <xsl:choose>
- <xsl:when test="$language='java' or $language='Java'">
- <xsl:apply-templates select="." mode="java"/>
- </xsl:when>
- <xsl:when test="$language='perl' or $language='Perl'">
- <xsl:apply-templates select="." mode="perl"/>
- </xsl:when>
- <xsl:when test="$language='idl' or $language='IDL'">
- <xsl:apply-templates select="." mode="idl"/>
- </xsl:when>
- <xsl:when test="$language='cpp' or $language='c++' or $language='C++'">
- <xsl:apply-templates select="." mode="cpp"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>
- <xsl:text>Unrecognized language on </xsl:text>
- <xsl:value-of select="local-name(.)"/>
- <xsl:text>: </xsl:text>
- <xsl:value-of select="$language"/>
- </xsl:message>
- <xsl:apply-templates select=".">
- <xsl:with-param name="language" select="$default-classsynopsis-language"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="synop-break">
- <xsl:if test="parent::classsynopsis or (following-sibling::fieldsynopsis |following-sibling::methodsynopsis |following-sibling::constructorsynopsis |following-sibling::destructorsynopsis)">
- <br/>
- </xsl:if>
- </xsl:template>
- <!-- ===== Java ======================================================== -->
- <xsl:template match="classsynopsis" mode="java">
- <pre>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates select="ooclass[1]" mode="java"/>
- <xsl:if test="ooclass[preceding-sibling::*]">
- <xsl:text> extends</xsl:text>
- <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="java"/>
- <xsl:if test="oointerface|ooexception">
- <br/>
- <xsl:text>    </xsl:text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="oointerface">
- <xsl:text>implements</xsl:text>
- <xsl:apply-templates select="oointerface" mode="java"/>
- <xsl:if test="ooexception">
- <br/>
- <xsl:text>    </xsl:text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="ooexception">
- <xsl:text>throws</xsl:text>
- <xsl:apply-templates select="ooexception" mode="java"/>
- </xsl:if>
- <xsl:text> {</xsl:text>
- <br/>
- <xsl:apply-templates select="constructorsynopsis |destructorsynopsis |fieldsynopsis |methodsynopsis |classsynopsisinfo" mode="java"/>
- <xsl:text>}</xsl:text>
- </pre>
- </xsl:template>
- <xsl:template match="classsynopsisinfo" mode="java">
- <xsl:apply-templates mode="java"/>
- </xsl:template>
- <xsl:template match="ooclass|oointerface|ooexception" mode="java">
- <xsl:choose>
- <xsl:when test="preceding-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- </span>
- </xsl:template>
- <xsl:template match="modifier|package" mode="java">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- <xsl:if test="following-sibling::*">
- <xsl:text> </xsl:text>
- </xsl:if>
- </span>
- </xsl:template>
- <xsl:template match="classname" mode="java">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- </span>
- </xsl:template>
- <xsl:template match="interfacename" mode="java">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- </span>
- </xsl:template>
- <xsl:template match="exceptionname" mode="java">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- </span>
- </xsl:template>
- <xsl:template match="fieldsynopsis" mode="java">
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:if test="parent::classsynopsis">
- <xsl:text>  </xsl:text>
- </xsl:if>
- <xsl:apply-templates mode="java"/>
- <xsl:text>;</xsl:text>
- </code>
- <xsl:call-template name="synop-break"/>
- </xsl:template>
- <xsl:template match="type" mode="java">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- <xsl:text> </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="varname" mode="java">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- <xsl:text> </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="initializer" mode="java">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>= </xsl:text>
- <xsl:apply-templates mode="java"/>
- </span>
- </xsl:template>
- <xsl:template match="void" mode="java">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>void </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="methodname" mode="java">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- </span>
- </xsl:template>
- <xsl:template match="methodparam" mode="java">
- <xsl:param name="indent">0</xsl:param>
- <xsl:if test="preceding-sibling::methodparam">
- <xsl:text>,</xsl:text>
- <br/>
- <xsl:if test="$indent > 0">
- <xsl:call-template name="copy-string">
- <xsl:with-param name="string"> </xsl:with-param>
- <xsl:with-param name="count" select="$indent + 1"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- </span>
- </xsl:template>
- <xsl:template match="parameter" mode="java">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="java"/>
- </span>
- </xsl:template>
- <xsl:template mode="java" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
- <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
- <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
- <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
- <xsl:variable name="decl">
- <xsl:if test="parent::classsynopsis">
- <xsl:text>  </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$start-modifiers" mode="java"/>
- <!-- type -->
- <xsl:if test="local-name($notmod[1]) != 'methodname'">
- <xsl:apply-templates select="$notmod[1]" mode="java"/>
- </xsl:if>
- <xsl:apply-templates select="methodname" mode="java"/>
- </xsl:variable>
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:copy-of select="$decl"/>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="methodparam" mode="java">
- <xsl:with-param name="indent" select="string-length($decl)"/>
- </xsl:apply-templates>
- <xsl:text>)</xsl:text>
- <xsl:if test="exceptionname">
- <br/>
- <xsl:text>    throws </xsl:text>
- <xsl:apply-templates select="exceptionname" mode="java"/>
- </xsl:if>
- <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="$end-modifiers" mode="java"/>
- </xsl:if>
- <xsl:text>;</xsl:text>
- </code>
- <xsl:call-template name="synop-break"/>
- </xsl:template>
- <!-- ===== C++ ========================================================= -->
- <xsl:template match="classsynopsis" mode="cpp">
- <pre>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
- <xsl:if test="ooclass[preceding-sibling::*]">
- <xsl:text>: </xsl:text>
- <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="cpp"/>
- <xsl:if test="oointerface|ooexception">
- <br/>
- <xsl:text>    </xsl:text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="oointerface">
- <xsl:text> implements</xsl:text>
- <xsl:apply-templates select="oointerface" mode="cpp"/>
- <xsl:if test="ooexception">
- <br/>
- <xsl:text>    </xsl:text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="ooexception">
- <xsl:text> throws</xsl:text>
- <xsl:apply-templates select="ooexception" mode="cpp"/>
- </xsl:if>
- <xsl:text> {</xsl:text>
- <br/>
- <xsl:apply-templates select="constructorsynopsis |destructorsynopsis |fieldsynopsis |methodsynopsis |classsynopsisinfo" mode="cpp"/>
- <xsl:text>}</xsl:text>
- </pre>
- </xsl:template>
- <xsl:template match="classsynopsisinfo" mode="cpp">
- <xsl:apply-templates mode="cpp"/>
- </xsl:template>
- <xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
- <xsl:if test="preceding-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- </span>
- </xsl:template>
- <xsl:template match="modifier|package" mode="cpp">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- <xsl:if test="following-sibling::*">
- <xsl:text> </xsl:text>
- </xsl:if>
- </span>
- </xsl:template>
- <xsl:template match="classname" mode="cpp">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- </span>
- </xsl:template>
- <xsl:template match="interfacename" mode="cpp">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- </span>
- </xsl:template>
- <xsl:template match="exceptionname" mode="cpp">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- </span>
- </xsl:template>
- <xsl:template match="fieldsynopsis" mode="cpp">
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:if test="parent::classsynopsis">
- <xsl:text>  </xsl:text>
- </xsl:if>
- <xsl:apply-templates mode="cpp"/>
- <xsl:text>;</xsl:text>
- </code>
- <xsl:call-template name="synop-break"/>
- </xsl:template>
- <xsl:template match="type" mode="cpp">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- <xsl:text> </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="varname" mode="cpp">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- <xsl:text> </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="initializer" mode="cpp">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>= </xsl:text>
- <xsl:apply-templates mode="cpp"/>
- </span>
- </xsl:template>
- <xsl:template match="void" mode="cpp">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>void </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="methodname" mode="cpp">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- </span>
- </xsl:template>
- <xsl:template match="methodparam" mode="cpp">
- <xsl:if test="preceding-sibling::methodparam">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- </span>
- </xsl:template>
- <xsl:template match="parameter" mode="cpp">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="cpp"/>
- </span>
- </xsl:template>
- <xsl:template mode="cpp" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
- <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
- <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
- <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:if test="parent::classsynopsis">
- <xsl:text>  </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$start-modifiers" mode="cpp"/>
- <!-- type -->
- <xsl:if test="local-name($notmod[1]) != 'methodname'">
- <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
- </xsl:if>
- <xsl:apply-templates select="methodname" mode="cpp"/>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="methodparam" mode="cpp"/>
- <xsl:text>)</xsl:text>
- <xsl:if test="exceptionname">
- <br/>
- <xsl:text>    throws </xsl:text>
- <xsl:apply-templates select="exceptionname" mode="cpp"/>
- </xsl:if>
- <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="$end-modifiers" mode="cpp"/>
- </xsl:if>
- <xsl:text>;</xsl:text>
- </code>
- <xsl:call-template name="synop-break"/>
- </xsl:template>
- <!-- ===== IDL ========================================================= -->
- <xsl:template match="classsynopsis" mode="idl">
- <pre>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>interface </xsl:text>
- <xsl:apply-templates select="ooclass[1]" mode="idl"/>
- <xsl:if test="ooclass[preceding-sibling::*]">
- <xsl:text>: </xsl:text>
- <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="idl"/>
- <xsl:if test="oointerface|ooexception">
- <br/>
- <xsl:text>    </xsl:text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="oointerface">
- <xsl:text> implements</xsl:text>
- <xsl:apply-templates select="oointerface" mode="idl"/>
- <xsl:if test="ooexception">
- <br/>
- <xsl:text>    </xsl:text>
- </xsl:if>
- </xsl:if>
- <xsl:if test="ooexception">
- <xsl:text> throws</xsl:text>
- <xsl:apply-templates select="ooexception" mode="idl"/>
- </xsl:if>
- <xsl:text> {</xsl:text>
- <br/>
- <xsl:apply-templates select="constructorsynopsis |destructorsynopsis |fieldsynopsis |methodsynopsis |classsynopsisinfo" mode="idl"/>
- <xsl:text>}</xsl:text>
- </pre>
- </xsl:template>
- <xsl:template match="classsynopsisinfo" mode="idl">
- <xsl:apply-templates mode="idl"/>
- </xsl:template>
- <xsl:template match="ooclass|oointerface|ooexception" mode="idl">
- <xsl:if test="preceding-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- </span>
- </xsl:template>
- <xsl:template match="modifier|package" mode="idl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- <xsl:if test="following-sibling::*">
- <xsl:text> </xsl:text>
- </xsl:if>
- </span>
- </xsl:template>
- <xsl:template match="classname" mode="idl">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- </span>
- </xsl:template>
- <xsl:template match="interfacename" mode="idl">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- </span>
- </xsl:template>
- <xsl:template match="exceptionname" mode="idl">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- </span>
- </xsl:template>
- <xsl:template match="fieldsynopsis" mode="idl">
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:if test="parent::classsynopsis">
- <xsl:text>  </xsl:text>
- </xsl:if>
- <xsl:apply-templates mode="idl"/>
- <xsl:text>;</xsl:text>
- </code>
- <xsl:call-template name="synop-break"/>
- </xsl:template>
- <xsl:template match="type" mode="idl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- <xsl:text> </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="varname" mode="idl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- <xsl:text> </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="initializer" mode="idl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>= </xsl:text>
- <xsl:apply-templates mode="idl"/>
- </span>
- </xsl:template>
- <xsl:template match="void" mode="idl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>void </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="methodname" mode="idl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- </span>
- </xsl:template>
- <xsl:template match="methodparam" mode="idl">
- <xsl:if test="preceding-sibling::methodparam">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- </span>
- </xsl:template>
- <xsl:template match="parameter" mode="idl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="idl"/>
- </span>
- </xsl:template>
- <xsl:template mode="idl" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
- <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
- <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
- <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:if test="parent::classsynopsis">
- <xsl:text>  </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$start-modifiers" mode="idl"/>
- <!-- type -->
- <xsl:if test="local-name($notmod[1]) != 'methodname'">
- <xsl:apply-templates select="$notmod[1]" mode="idl"/>
- </xsl:if>
- <xsl:apply-templates select="methodname" mode="idl"/>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="methodparam" mode="idl"/>
- <xsl:text>)</xsl:text>
- <xsl:if test="exceptionname">
- <br/>
- <xsl:text>    raises(</xsl:text>
- <xsl:apply-templates select="exceptionname" mode="idl"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="$end-modifiers" mode="idl"/>
- </xsl:if>
- <xsl:text>;</xsl:text>
- </code>
- <xsl:call-template name="synop-break"/>
- </xsl:template>
- <!-- ===== Perl ======================================================== -->
- <xsl:template match="classsynopsis" mode="perl">
- <pre>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>package </xsl:text>
- <xsl:apply-templates select="ooclass[1]" mode="perl"/>
- <xsl:text>;</xsl:text>
- <br/>
- <xsl:if test="ooclass[preceding-sibling::*]">
- <xsl:text>@ISA = (</xsl:text>
- <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="perl"/>
- <xsl:text>);</xsl:text>
- <br/>
- </xsl:if>
- <xsl:apply-templates select="constructorsynopsis |destructorsynopsis |fieldsynopsis |methodsynopsis |classsynopsisinfo" mode="perl"/>
- </pre>
- </xsl:template>
- <xsl:template match="classsynopsisinfo" mode="perl">
- <xsl:apply-templates mode="perl"/>
- </xsl:template>
- <xsl:template match="ooclass|oointerface|ooexception" mode="perl">
- <xsl:if test="preceding-sibling::*">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- </span>
- </xsl:template>
- <xsl:template match="modifier|package" mode="perl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- <xsl:if test="following-sibling::*">
- <xsl:text> </xsl:text>
- </xsl:if>
- </span>
- </xsl:template>
- <xsl:template match="classname" mode="perl">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- </span>
- </xsl:template>
- <xsl:template match="interfacename" mode="perl">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- </span>
- </xsl:template>
- <xsl:template match="exceptionname" mode="perl">
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- </span>
- </xsl:template>
- <xsl:template match="fieldsynopsis" mode="perl">
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:if test="parent::classsynopsis">
- <xsl:text>  </xsl:text>
- </xsl:if>
- <xsl:apply-templates mode="perl"/>
- <xsl:text>;</xsl:text>
- </code>
- <xsl:call-template name="synop-break"/>
- </xsl:template>
- <xsl:template match="type" mode="perl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- <xsl:text> </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="varname" mode="perl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- <xsl:text> </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="initializer" mode="perl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>= </xsl:text>
- <xsl:apply-templates mode="perl"/>
- </span>
- </xsl:template>
- <xsl:template match="void" mode="perl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>void </xsl:text>
- </span>
- </xsl:template>
- <xsl:template match="methodname" mode="perl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- </span>
- </xsl:template>
- <xsl:template match="methodparam" mode="perl">
- <xsl:if test="preceding-sibling::methodparam">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- </span>
- </xsl:template>
- <xsl:template match="parameter" mode="perl">
- <span>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="perl"/>
- </span>
- </xsl:template>
- <xsl:template mode="perl" match="constructorsynopsis|destructorsynopsis|methodsynopsis">
- <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
- <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
- <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
- <code>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:text>sub </xsl:text>
- <xsl:apply-templates select="methodname" mode="perl"/>
- <xsl:text> { ... };</xsl:text>
- </code>
- <xsl:call-template name="synop-break"/>
- </xsl:template>
- <!-- ==================================================================== -->
- <!-- * DocBook 5 allows linking elements (link, olink, and xref) -->
- <!-- * within the OO *synopsis elements (classsynopsis, fieldsynopsis, -->
- <!-- * methodsynopsis, constructorsynopsis, destructorsynopsis) and -->
- <!-- * their children. So we need to have mode="java|cpp|idl|perl" -->
- <!-- * per-mode matches for those linking elements in order for them -->
- <!-- * to be processed as expected. -->
- <xsl:template match="link|olink|xref" mode="java">
- <xsl:apply-templates select="."/>
- </xsl:template>
- <xsl:template match="link|olink|xref" mode="cpp">
- <xsl:apply-templates select="."/>
- </xsl:template>
- <xsl:template match="link|olink|xref" mode="idl">
- <xsl:apply-templates select="."/>
- </xsl:template>
- <xsl:template match="link|olink|xref" mode="perl">
- <xsl:apply-templates select="."/>
- </xsl:template>
- </xsl:stylesheet>
|