| 1 |
<?xml version='1.0'?> |
| 2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> |
| 3 |
|
| 4 |
<!--############################################################################ |
| 5 |
XSLT Stylesheet DocBook -> LaTeX |
| 6 |
############################################################################ --> |
| 7 |
|
| 8 |
<xsl:template match="sgmltag|tag"> |
| 9 |
<xsl:param name="class"> |
| 10 |
<xsl:choose> |
| 11 |
<xsl:when test="@class"> |
| 12 |
<xsl:value-of select="normalize-space(@class)"/> |
| 13 |
</xsl:when> |
| 14 |
<xsl:otherwise>element</xsl:otherwise> |
| 15 |
</xsl:choose> |
| 16 |
</xsl:param> |
| 17 |
|
| 18 |
<xsl:choose> |
| 19 |
<xsl:when test="$class='attribute'"> |
| 20 |
<xsl:call-template name="inline.monoseq"/> |
| 21 |
</xsl:when> |
| 22 |
<xsl:when test="$class='attvalue'"> |
| 23 |
<xsl:call-template name="inline.monoseq"/> |
| 24 |
</xsl:when> |
| 25 |
<xsl:when test="$class='element'"> |
| 26 |
<xsl:call-template name="inline.monoseq"/> |
| 27 |
</xsl:when> |
| 28 |
<xsl:when test="$class='endtag'"> |
| 29 |
<xsl:call-template name="inline.monoseq"> |
| 30 |
<xsl:with-param name="content"> |
| 31 |
<xsl:text>$<$/</xsl:text> |
| 32 |
<xsl:apply-templates/> |
| 33 |
<xsl:text>$>$</xsl:text> |
| 34 |
</xsl:with-param> |
| 35 |
</xsl:call-template> |
| 36 |
</xsl:when> |
| 37 |
<xsl:when test="$class='genentity'"> |
| 38 |
<xsl:call-template name="inline.monoseq"> |
| 39 |
<xsl:with-param name="content"> |
| 40 |
<xsl:text>\&</xsl:text> |
| 41 |
<xsl:apply-templates/> |
| 42 |
<xsl:text>;</xsl:text> |
| 43 |
</xsl:with-param> |
| 44 |
</xsl:call-template> |
| 45 |
</xsl:when> |
| 46 |
<xsl:when test="$class='numcharref'"> |
| 47 |
<xsl:call-template name="inline.monoseq"> |
| 48 |
<xsl:with-param name="content"> |
| 49 |
<xsl:text>\&\#</xsl:text> |
| 50 |
<xsl:apply-templates/> |
| 51 |
<xsl:text>;</xsl:text> |
| 52 |
</xsl:with-param> |
| 53 |
</xsl:call-template> |
| 54 |
</xsl:when> |
| 55 |
<xsl:when test="$class='paramentity'"> |
| 56 |
<xsl:call-template name="inline.monoseq"> |
| 57 |
<xsl:with-param name="content"> |
| 58 |
<xsl:text>\%</xsl:text> |
| 59 |
<xsl:apply-templates/> |
| 60 |
<xsl:text>;</xsl:text> |
| 61 |
</xsl:with-param> |
| 62 |
</xsl:call-template> |
| 63 |
</xsl:when> |
| 64 |
<xsl:when test="$class='pi'"> |
| 65 |
<xsl:call-template name="inline.monoseq"> |
| 66 |
<xsl:with-param name="content"> |
| 67 |
<xsl:text>$<$?</xsl:text> |
| 68 |
<xsl:apply-templates/> |
| 69 |
<xsl:text>?$>$</xsl:text> |
| 70 |
</xsl:with-param> |
| 71 |
</xsl:call-template> |
| 72 |
</xsl:when> |
| 73 |
<xsl:when test="$class='xmlpi'"> |
| 74 |
<xsl:call-template name="inline.monoseq"> |
| 75 |
<xsl:with-param name="content"> |
| 76 |
<xsl:text>$<$?</xsl:text> |
| 77 |
<xsl:apply-templates/> |
| 78 |
<xsl:text>?$>$</xsl:text> |
| 79 |
</xsl:with-param> |
| 80 |
</xsl:call-template> |
| 81 |
</xsl:when> |
| 82 |
<xsl:when test="$class='starttag'"> |
| 83 |
<xsl:call-template name="inline.monoseq"> |
| 84 |
<xsl:with-param name="content"> |
| 85 |
<xsl:text>$<$</xsl:text> |
| 86 |
<xsl:apply-templates/> |
| 87 |
<xsl:text>$>$</xsl:text> |
| 88 |
</xsl:with-param> |
| 89 |
</xsl:call-template> |
| 90 |
</xsl:when> |
| 91 |
<xsl:when test="$class='emptytag'"> |
| 92 |
<xsl:call-template name="inline.monoseq"> |
| 93 |
<xsl:with-param name="content"> |
| 94 |
<xsl:text>$<$</xsl:text> |
| 95 |
<xsl:apply-templates/> |
| 96 |
<xsl:text>/$>$</xsl:text> |
| 97 |
</xsl:with-param> |
| 98 |
</xsl:call-template> |
| 99 |
</xsl:when> |
| 100 |
<xsl:when test="$class='sgmlcomment'"> |
| 101 |
<xsl:call-template name="inline.monoseq"> |
| 102 |
<xsl:with-param name="content"> |
| 103 |
<xsl:text>$<$!$--$</xsl:text> |
| 104 |
<xsl:apply-templates/> |
| 105 |
<xsl:text>$-->$</xsl:text> |
| 106 |
</xsl:with-param> |
| 107 |
</xsl:call-template> |
| 108 |
</xsl:when> |
| 109 |
<xsl:otherwise> |
| 110 |
<xsl:call-template name="inline.charseq"/> |
| 111 |
</xsl:otherwise> |
| 112 |
</xsl:choose> |
| 113 |
</xsl:template> |
| 114 |
|
| 115 |
</xsl:stylesheet> |