Ignore:
Timestamp:
10/08/2013 08:03:29 PM (11 years ago)
Author:
Matthew Burgess <matthew@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 7.5, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
58675ce
Parents:
09a35dd
Message:

Update stylesheets to docbook-xsl-1.78.1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10355 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 moved

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/fo/verbatim.xsl

    r09a35dd r15c7d39  
    1010
    1111<!-- ********************************************************************
    12      $Id$
     12     $Id: verbatim.xsl 9590 2012-09-02 20:53:23Z tom_schr $
    1313     ********************************************************************
    1414
     
    1919     ******************************************************************** -->
    2020
    21 <xsl:include href="../highlighting/common.xsl"/>
    22 <xsl:include href="highlight.xsl"/>
     21<!-- XSLTHL highlighting is turned off by default. See highlighting/README
     22     for instructions on how to turn on XSLTHL -->
     23<xsl:template name="apply-highlighting">
     24    <xsl:apply-templates/>
     25</xsl:template>
    2326
    2427<lxslt:component prefix="xverb"
     
    3740        <xsl:call-template name="number.rtf.lines">
    3841          <xsl:with-param name="rtf">
    39             <xsl:call-template name="apply-highlighting"/>
     42            <xsl:choose>
     43              <xsl:when test="$highlight.source != 0">
     44                <xsl:call-template name="apply-highlighting"/>
     45              </xsl:when>
     46              <xsl:otherwise>
     47                <xsl:apply-templates/>
     48              </xsl:otherwise>
     49            </xsl:choose>
    4050          </xsl:with-param>
    4151        </xsl:call-template>
    4252      </xsl:when>
    4353      <xsl:otherwise>
    44         <xsl:call-template name="apply-highlighting"/>
    45       </xsl:otherwise>
    46     </xsl:choose>
    47   </xsl:variable>
    48 
    49   <xsl:choose>
    50     <xsl:when test="$shade.verbatim != 0">
    51       <fo:block id="{$id}"
    52                 xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">
    5354        <xsl:choose>
    54           <xsl:when test="$hyphenate.verbatim != 0 and function-available('exsl:node-set')">
    55             <xsl:apply-templates select="exsl:node-set($content)" mode="hyphenate.verbatim"/>
     55          <xsl:when test="$highlight.source != 0">
     56            <xsl:call-template name="apply-highlighting"/>
    5657          </xsl:when>
    5758          <xsl:otherwise>
    58             <xsl:copy-of select="$content"/>
     59            <xsl:apply-templates/>
    5960          </xsl:otherwise>
    6061        </xsl:choose>
    61       </fo:block>
    62     </xsl:when>
    63     <xsl:otherwise>
    64       <fo:block id="{$id}"
    65                 xsl:use-attribute-sets="monospace.verbatim.properties">
    66         <xsl:choose>
    67           <xsl:when test="$hyphenate.verbatim != 0 and function-available('exsl:node-set')">
    68             <xsl:apply-templates select="exsl:node-set($content)" mode="hyphenate.verbatim"/>
    69           </xsl:when>
    70           <xsl:otherwise>
    71             <xsl:copy-of select="$content"/>
    72           </xsl:otherwise>
    73         </xsl:choose>
    74       </fo:block>
    75     </xsl:otherwise>
    76   </xsl:choose>
     62      </xsl:otherwise>
     63    </xsl:choose>
     64  </xsl:variable>
     65
     66  <xsl:variable name="keep.together">
     67    <xsl:call-template name="pi.dbfo_keep-together"/>
     68  </xsl:variable>
     69
     70  <xsl:variable name="block.content">
     71    <xsl:choose>
     72      <xsl:when test="$shade.verbatim != 0">
     73        <fo:block id="{$id}"
     74             xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">
     75          <xsl:if test="$keep.together != ''">
     76            <xsl:attribute name="keep-together.within-column"><xsl:value-of
     77            select="$keep.together"/></xsl:attribute>
     78          </xsl:if>
     79          <xsl:choose>
     80            <xsl:when test="$hyphenate.verbatim != 0 and
     81                            $exsl.node.set.available != 0">
     82              <xsl:apply-templates select="exsl:node-set($content)"
     83                                   mode="hyphenate.verbatim"/>
     84            </xsl:when>
     85            <xsl:otherwise>
     86              <xsl:copy-of select="$content"/>
     87            </xsl:otherwise>
     88          </xsl:choose>
     89        </fo:block>
     90      </xsl:when>
     91      <xsl:otherwise>
     92        <fo:block id="{$id}"
     93                  xsl:use-attribute-sets="monospace.verbatim.properties">
     94          <xsl:if test="$keep.together != ''">
     95            <xsl:attribute name="keep-together.within-column"><xsl:value-of
     96            select="$keep.together"/></xsl:attribute>
     97          </xsl:if>
     98          <xsl:choose>
     99            <xsl:when test="$hyphenate.verbatim != 0 and
     100                            $exsl.node.set.available != 0">
     101              <xsl:apply-templates select="exsl:node-set($content)"
     102                                   mode="hyphenate.verbatim"/>
     103            </xsl:when>
     104            <xsl:otherwise>
     105              <xsl:copy-of select="$content"/>
     106            </xsl:otherwise>
     107          </xsl:choose>
     108        </fo:block>
     109      </xsl:otherwise>
     110    </xsl:choose>
     111  </xsl:variable>
     112
     113  <xsl:choose>
     114    <!-- Need a block-container for these features -->
     115    <xsl:when test="@width != '' or
     116                    (self::programlisting and
     117                    starts-with($writing.mode, 'rl'))">
     118      <fo:block-container start-indent="0pt" end-indent="0pt">
     119        <xsl:if test="@width != ''">
     120          <xsl:attribute name="width">
     121            <xsl:value-of select="concat(@width, '*', $monospace.verbatim.font.width)"/>
     122          </xsl:attribute>
     123        </xsl:if>
     124        <!-- All known program code is left-to-right -->
     125        <xsl:if test="self::programlisting and
     126                      starts-with($writing.mode, 'rl')">
     127          <xsl:attribute name="writing-mode">lr-tb</xsl:attribute>
     128        </xsl:if>
     129        <xsl:copy-of select="$block.content"/>
     130      </fo:block-container>
     131    </xsl:when>
     132    <xsl:otherwise>
     133      <xsl:copy-of select="$block.content"/>
     134    </xsl:otherwise>
     135  </xsl:choose>
     136
    77137</xsl:template>
    78138
     
    81141
    82142  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
     143
     144  <xsl:variable name="keep.together">
     145    <xsl:call-template name="pi.dbfo_keep-together"/>
     146  </xsl:variable>
    83147
    84148  <xsl:variable name="content">
     
    106170          <fo:block id="{$id}"
    107171                    xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style">
    108 
     172            <xsl:if test="$keep.together != ''">
     173              <xsl:attribute name="keep-together.within-column"><xsl:value-of
     174              select="$keep.together"/></xsl:attribute>
     175            </xsl:if>
    109176            <xsl:copy-of select="$content"/>
    110177          </fo:block>
     
    113180          <fo:block id="{$id}"
    114181                    xsl:use-attribute-sets="monospace.verbatim.properties">
     182            <xsl:if test="$keep.together != ''">
     183              <xsl:attribute name="keep-together.within-column"><xsl:value-of
     184              select="$keep.together"/></xsl:attribute>
     185            </xsl:if>
    115186            <xsl:copy-of select="$content"/>
    116187          </fo:block>
     
    123194          <fo:block id="{$id}"
    124195                    xsl:use-attribute-sets="verbatim.properties shade.verbatim.style">
     196            <xsl:if test="$keep.together != ''">
     197              <xsl:attribute name="keep-together.within-column"><xsl:value-of
     198              select="$keep.together"/></xsl:attribute>
     199            </xsl:if>
    125200            <xsl:copy-of select="$content"/>
    126201          </fo:block>
     
    129204          <fo:block id="{$id}"
    130205                    xsl:use-attribute-sets="verbatim.properties">
     206            <xsl:if test="$keep.together != ''">
     207              <xsl:attribute name="keep-together.within-column"><xsl:value-of
     208              select="$keep.together"/></xsl:attribute>
     209            </xsl:if>
    131210            <xsl:copy-of select="$content"/>
    132211          </fo:block>
     
    320399    <xsl:when test="$listings[1]/@continuation='continues'">
    321400      <xsl:call-template name="lastLineNumber">
    322         <xsl:with-param name="listings" select="listings[position() &gt; 1]"/>
     401        <xsl:with-param name="listings" select="$listings[position() &gt; 1]"/>
    323402        <xsl:with-param name="number" select="$number + $lines"/>
    324403      </xsl:call-template>
Note: See TracChangeset for help on using the changeset viewer.