- Timestamp:
- 12/10/2013 11:37:38 PM (11 years ago)
- Branches:
- 7.5-systemd, 7.6-systemd, 7.7-systemd, 7.8-systemd, 7.9-systemd
- Children:
- 112db9d
- Parents:
- f2a5108
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml-1_1/verbatim.xsl
rf2a5108 rb1a51ac1 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: verbatim.xsl 9589 2012-09-02 20:52:15Z tom_schr $ 8 8 ******************************************************************** 9 9 … … 14 14 ******************************************************************** --> 15 15 16 <xsl:include href="../highlighting/common.xsl"/> 17 <xsl:include href="highlight.xsl"/> 16 <!-- XSLTHL highlighting is turned off by default. See highlighting/README 17 for instructions on how to turn on XSLTHL --> 18 <xsl:template name="apply-highlighting"> 19 <xsl:apply-templates/> 20 </xsl:template> 18 21 19 22 <lxslt:component prefix="xverb" functions="numberLines"/> … … 21 24 <xsl:template match="programlisting|screen|synopsis"> 22 25 <xsl:param name="suppress-numbers" select="'0'"/> 23 <xsl:variable name="id">24 <xsl:call-template name="object.id"/>25 </xsl:variable>26 26 27 27 <xsl:call-template name="anchor"/> 28 29 <xsl:variable name="div.element">pre</xsl:variable> 28 30 29 31 <xsl:if test="$shade.verbatim != 0"> … … 40 42 41 43 <xsl:choose> 42 <xsl:when test="$suppress-numbers = '0' and @linenumbering = 'numbered' and $use.extensions != '0'and $linenumbering.extension != '0'">44 <xsl:when test="$suppress-numbers = '0' and @linenumbering = 'numbered' and $use.extensions != '0' and $linenumbering.extension != '0'"> 43 45 <xsl:variable name="rtf"> 44 <xsl:call-template name="apply-highlighting"/> 46 <xsl:choose> 47 <xsl:when test="$highlight.source != 0"> 48 <xsl:call-template name="apply-highlighting"/> 49 </xsl:when> 50 <xsl:otherwise> 51 <xsl:apply-templates/> 52 </xsl:otherwise> 53 </xsl:choose> 45 54 </xsl:variable> 46 <pre> 47 <xsl:apply-templates select="." mode="class.attribute"/> 48 <xsl:call-template name="number.rtf.lines"> 49 <xsl:with-param name="rtf" select="$rtf"/> 50 </xsl:call-template> 51 </pre> 52 </xsl:when> 53 <xsl:otherwise> 54 <pre> 55 <xsl:apply-templates select="." mode="class.attribute"/> 56 <xsl:call-template name="apply-highlighting"/> 57 </pre> 55 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml"> 56 <xsl:apply-templates select="." mode="common.html.attributes"/> 57 <xsl:call-template name="id.attribute"/> 58 <xsl:if test="@width != ''"> 59 <xsl:attribute name="width"> 60 <xsl:value-of select="@width"/> 61 </xsl:attribute> 62 </xsl:if> 63 <xsl:call-template name="number.rtf.lines"> 64 <xsl:with-param name="rtf" select="$rtf"/> 65 </xsl:call-template> 66 </xsl:element> 67 </xsl:when> 68 <xsl:otherwise> 69 <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml"> 70 <xsl:apply-templates select="." mode="common.html.attributes"/> 71 <xsl:call-template name="id.attribute"/> 72 <xsl:if test="@width != ''"> 73 <xsl:attribute name="width"> 74 <xsl:value-of select="@width"/> 75 </xsl:attribute> 76 </xsl:if> 77 <xsl:choose> 78 <xsl:when test="$highlight.source != 0"> 79 <xsl:call-template name="apply-highlighting"/> 80 </xsl:when> 81 <xsl:otherwise> 82 <xsl:apply-templates/> 83 </xsl:otherwise> 84 </xsl:choose> 85 </xsl:element> 58 86 </xsl:otherwise> 59 87 </xsl:choose> … … 80 108 81 109 <xsl:choose> 82 <xsl:when test="$suppress-numbers = '0' and @linenumbering = 'numbered' and $use.extensions != '0'and $linenumbering.extension != '0'">110 <xsl:when test="$suppress-numbers = '0' and @linenumbering = 'numbered' and $use.extensions != '0' and $linenumbering.extension != '0'"> 83 111 <xsl:choose> 84 112 <xsl:when test="@class='monospaced'"> 85 113 <pre> 86 <xsl:apply-templates select="." mode="class.attribute"/> 87 <xsl:call-template name="number.rtf.lines"> 88 <xsl:with-param name="rtf" select="$rtf"/> 89 </xsl:call-template> 90 </pre> 91 </xsl:when> 92 <xsl:otherwise> 114 <xsl:apply-templates select="." mode="common.html.attributes"/> 115 <xsl:call-template name="id.attribute"/> 116 <xsl:call-template name="number.rtf.lines"> 117 <xsl:with-param name="rtf" select="$rtf"/> 118 </xsl:call-template> 119 </pre> 120 </xsl:when> 121 <xsl:otherwise> 93 122 <div> 94 <xsl:apply-templates select="." mode="class.attribute"/> 95 <p> 96 <xsl:call-template name="number.rtf.lines"> 97 <xsl:with-param name="rtf" select="$rtf"/> 98 </xsl:call-template> 99 </p> 100 </div> 101 </xsl:otherwise> 123 <xsl:apply-templates select="." mode="common.html.attributes"/> 124 <xsl:call-template name="id.attribute"/> 125 <p> 126 <xsl:call-template name="number.rtf.lines"> 127 <xsl:with-param name="rtf" select="$rtf"/> 128 </xsl:call-template> 129 </p> 130 </div> 131 </xsl:otherwise> 102 132 </xsl:choose> 103 133 </xsl:when> 104 134 <xsl:otherwise> 105 135 <xsl:choose> 106 136 <xsl:when test="@class='monospaced'"> 107 137 <pre> 108 <xsl:apply-templates select="." mode="class.attribute"/> 109 <xsl:copy-of select="$rtf"/> 110 </pre> 111 </xsl:when> 112 <xsl:otherwise> 138 <xsl:apply-templates select="." mode="common.html.attributes"/> 139 <xsl:call-template name="id.attribute"/> 140 <xsl:copy-of select="$rtf"/> 141 </pre> 142 </xsl:when> 143 <xsl:otherwise> 113 144 <div> 114 <xsl:apply-templates select="." mode="class.attribute"/> 115 <p> 116 <xsl:call-template name="make-verbatim"> 117 <xsl:with-param name="rtf" select="$rtf"/> 118 </xsl:call-template> 119 </p> 120 </div> 121 </xsl:otherwise> 145 <xsl:apply-templates select="." mode="common.html.attributes"/> 146 <xsl:call-template name="id.attribute"/> 147 <p> 148 <xsl:call-template name="make-verbatim"> 149 <xsl:with-param name="rtf" select="$rtf"/> 150 </xsl:call-template> 151 </p> 152 </div> 153 </xsl:otherwise> 122 154 </xsl:choose> 123 155 </xsl:otherwise> … … 135 167 <xsl:when test="$suppress-numbers = '0' and @linenumbering = 'numbered' and $use.extensions != '0' and $linenumbering.extension != '0'"> 136 168 <div> 137 <xsl:apply-templates select="." mode="class.attribute"/> 169 <xsl:apply-templates select="." mode="common.html.attributes"/> 170 <xsl:call-template name="id.attribute"/> 138 171 <p> 139 172 <xsl:call-template name="number.rtf.lines"> … … 146 179 <xsl:otherwise> 147 180 <div> 148 <xsl:apply-templates select="." mode="class.attribute"/> 181 <xsl:apply-templates select="." mode="common.html.attributes"/> 182 <xsl:call-template name="id.attribute"/> 149 183 <p> 150 184 <xsl:call-template name="make-verbatim"> … … 293 327 294 328 <xsl:choose> 295 <xsl:when test=" function-available('exsl:node-set')">329 <xsl:when test="$exsl.node.set.available != 0"> 296 330 <xsl:apply-templates select="exsl:node-set($rtf)" mode="make.verbatim.mode"/> 297 331 </xsl:when> … … 325 359 <xsl:when test="$listings[1]/@continuation='continues'"> 326 360 <xsl:call-template name="lastLineNumber"> 327 <xsl:with-param name="listings" select=" listings[position() > 1]"/>361 <xsl:with-param name="listings" select="$listings[position() > 1]"/> 328 362 <xsl:with-param name="number" select="$number + $lines"/> 329 363 </xsl:call-template>
Note:
See TracChangeset
for help on using the changeset viewer.