| 1 |
<?xml version='1.0'?> |
| 2 |
<!DOCTYPE xsl:stylesheet [ |
| 3 |
<!ENTITY nbsp " "> |
| 4 |
]> |
| 5 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 6 |
version='1.0'> |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
<xsl:template match="funcprototype"> |
| 21 |
<xsl:variable name="html-style"> |
| 22 |
<xsl:call-template name="dbhtml-attribute"> |
| 23 |
<xsl:with-param name="pis" |
| 24 |
select="ancestor::funcsynopsis//processing-instruction('dbhtml')"/> |
| 25 |
<xsl:with-param name="attribute" select="'funcsynopsis-style'"/> |
| 26 |
</xsl:call-template> |
| 27 |
</xsl:variable> |
| 28 |
|
| 29 |
<xsl:variable name="style"> |
| 30 |
<xsl:choose> |
| 31 |
<xsl:when test="$html-style != ''"> |
| 32 |
<xsl:value-of select="$html-style"/> |
| 33 |
</xsl:when> |
| 34 |
<xsl:otherwise> |
| 35 |
<xsl:value-of select="$funcsynopsis.style"/> |
| 36 |
</xsl:otherwise> |
| 37 |
</xsl:choose> |
| 38 |
</xsl:variable> |
| 39 |
|
| 40 |
<xsl:choose> |
| 41 |
<xsl:when test="$style = 'kr'"> |
| 42 |
<xsl:apply-templates select="." mode="kr-nontabular"/> |
| 43 |
</xsl:when> |
| 44 |
<xsl:when test="$style = 'common-lisp'"> |
| 45 |
<xsl:apply-templates select="." mode="common-lisp"/> |
| 46 |
</xsl:when> |
| 47 |
<xsl:otherwise> |
| 48 |
<xsl:apply-templates select="." mode="ansi-nontabular"/> |
| 49 |
</xsl:otherwise> |
| 50 |
</xsl:choose> |
| 51 |
</xsl:template> |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
<xsl:template match="funcprototype" mode="common-lisp"> |
| 57 |
<p> |
| 58 |
<xsl:apply-templates mode="common-lisp"/> |
| 59 |
</p> |
| 60 |
</xsl:template> |
| 61 |
|
| 62 |
<xsl:template match="funcdef" mode="common-lisp"> |
| 63 |
<code class="{name(.)}"> |
| 64 |
<xsl:text>(</xsl:text> |
| 65 |
<xsl:apply-templates mode="common-lisp"/> |
| 66 |
</code> |
| 67 |
</xsl:template> |
| 68 |
|
| 69 |
<xsl:template match="funcdef/function" mode="common-lisp"> |
| 70 |
<xsl:choose> |
| 71 |
<xsl:when test="$funcsynopsis.decoration != 0"> |
| 72 |
<b class="fsfunc"><xsl:apply-templates mode="common-lisp"/></b> |
| 73 |
</xsl:when> |
| 74 |
<xsl:otherwise> |
| 75 |
<xsl:apply-templates mode="common-lisp"/> |
| 76 |
</xsl:otherwise> |
| 77 |
</xsl:choose> |
| 78 |
</xsl:template> |
| 79 |
|
| 80 |
<xsl:template match="void" mode="common-lisp"> |
| 81 |
<code>)</code> |
| 82 |
</xsl:template> |
| 83 |
|
| 84 |
<xsl:template match="varargs" mode="common-lisp"> |
| 85 |
</xsl:template> |
| 86 |
|
| 87 |
<xsl:template match="paramdef" mode="common-lisp"> |
| 88 |
<xsl:text> </xsl:text><xsl:apply-templates mode="common-lisp"/> |
| 89 |
<xsl:choose> |
| 90 |
<xsl:when test="following-sibling::*"> |
| 91 |
<xsl:text> </xsl:text> |
| 92 |
</xsl:when> |
| 93 |
<xsl:otherwise> |
| 94 |
<xsl:text>)</xsl:text> |
| 95 |
</xsl:otherwise> |
| 96 |
</xsl:choose> |
| 97 |
</xsl:template> |
| 98 |
|
| 99 |
<xsl:template match="paramdef/parameter" mode="common-lisp"> |
| 100 |
<xsl:choose> |
| 101 |
<xsl:when test="$funcsynopsis.decoration != 0"> |
| 102 |
<var class="pdparam"> |
| 103 |
<xsl:apply-templates mode="common-lisp"/> |
| 104 |
</var> |
| 105 |
</xsl:when> |
| 106 |
<xsl:otherwise> |
| 107 |
<xsl:apply-templates mode="common-lisp"/> |
| 108 |
</xsl:otherwise> |
| 109 |
</xsl:choose> |
| 110 |
</xsl:template> |
| 111 |
|
| 112 |
<xsl:template match="funcparams" mode="common-lisp"> |
| 113 |
<xsl:apply-templates mode="common-lisp"/> |
| 114 |
</xsl:template> |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
</xsl:stylesheet> |