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, 12.2, 12.2-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/loongarch-12.2, xry111/mips64el, xry111/multilib, 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/common/common.xsl

    r09a35dd r15c7d39  
    11<?xml version='1.0'?>
     2<!DOCTYPE xsl:stylesheet [
     3<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
     4<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
     5 ]>
    26<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    37                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
     
    812
    913<!-- ********************************************************************
    10      $Id$
     14     $Id: common.xsl 9347 2012-05-11 03:49:49Z bobstayton $
    1115     ********************************************************************
    1216
     
    2125    <title>Common » Base Template Reference</title>
    2226    <releaseinfo role="meta">
    23       $Id$
     27      $Id: common.xsl 9347 2012-05-11 03:49:49Z bobstayton $
    2428    </releaseinfo>
    2529  </info>
     
    4448artheader article audiodata audioobject author authorblurb authorgroup
    4549beginpage bibliodiv biblioentry bibliography biblioset blockquote book
    46 bookbiblio bookinfo callout calloutlist caption caution chapter
     50bookinfo callout calloutlist caption caution chapter
    4751citerefentry cmdsynopsis co collab colophon colspec confgroup
    4852copyright dedication docinfo editor entrytbl epigraph equation
     
    6569subjectset substeps synopfragment table tbody textobject tfoot tgroup
    6670thead tip toc tocchap toclevel1 toclevel2 toclevel3 toclevel4
    67 toclevel5 tocpart varargs variablelist varlistentry videodata
     71toclevel5 tocpart topic varargs variablelist varlistentry videodata
    6872videoobject void warning subjectset
    6973
     
    458462    <xsl:when test="$object/@xml:id">
    459463      <xsl:value-of select="$object/@xml:id"/>
     464    </xsl:when>
     465    <xsl:when test="$generate.consistent.ids != 0">
     466      <!-- Make $object the current node -->
     467      <xsl:for-each select="$object">
     468        <xsl:text>id-</xsl:text>
     469        <xsl:number level="multiple" count="*"/>
     470      </xsl:for-each>
    460471    </xsl:when>
    461472    <xsl:otherwise>
     
    647658-->
    648659
    649 <xsl:variable name="arg.choice.opt.open.str">[</xsl:variable>
    650 <xsl:variable name="arg.choice.opt.close.str">]</xsl:variable>
    651 <xsl:variable name="arg.choice.req.open.str">{</xsl:variable>
    652 <xsl:variable name="arg.choice.req.close.str">}</xsl:variable>
    653 <xsl:variable name="arg.choice.plain.open.str"><xsl:text> </xsl:text></xsl:variable>
    654 <xsl:variable name="arg.choice.plain.close.str"><xsl:text> </xsl:text></xsl:variable>
    655 <xsl:variable name="arg.choice.def.open.str">[</xsl:variable>
    656 <xsl:variable name="arg.choice.def.close.str">]</xsl:variable>
    657 <xsl:variable name="arg.rep.repeat.str">...</xsl:variable>
    658 <xsl:variable name="arg.rep.norepeat.str"></xsl:variable>
    659 <xsl:variable name="arg.rep.def.str"></xsl:variable>
    660 <xsl:variable name="arg.or.sep"> | </xsl:variable>
    661 <xsl:variable name="cmdsynopsis.hanging.indent">4pi</xsl:variable>
     660<xsl:param name="arg.choice.opt.open.str">[</xsl:param>
     661<xsl:param name="arg.choice.opt.close.str">]</xsl:param>
     662<xsl:param name="arg.choice.req.open.str">{</xsl:param>
     663<xsl:param name="arg.choice.req.close.str">}</xsl:param>
     664<xsl:param name="arg.choice.plain.open.str"><xsl:text> </xsl:text></xsl:param>
     665<xsl:param name="arg.choice.plain.close.str"><xsl:text> </xsl:text></xsl:param>
     666<xsl:param name="arg.choice.def.open.str">[</xsl:param>
     667<xsl:param name="arg.choice.def.close.str">]</xsl:param>
     668<xsl:param name="arg.rep.repeat.str">...</xsl:param>
     669<xsl:param name="arg.rep.norepeat.str"></xsl:param>
     670<xsl:param name="arg.rep.def.str"></xsl:param>
     671<xsl:param name="arg.or.sep"> | </xsl:param>
     672<xsl:param name="cmdsynopsis.hanging.indent">4pi</xsl:param>
    662673
    663674<!-- ====================================================================== -->
     
    963974        <xsl:variable name="useobject">
    964975          <xsl:choose>
     976            <!-- select videoobject or audioobject before textobject -->
     977            <xsl:when test="local-name($object) = 'videoobject'">
     978              <xsl:text>1</xsl:text>
     979            </xsl:when>
     980            <xsl:when test="local-name($object) = 'audioobject'">
     981              <xsl:text>1</xsl:text>
     982            </xsl:when>
     983            <!-- skip textobject if also video, audio, or image out of order -->
     984            <xsl:when test="local-name($object) = 'textobject' and
     985                            ../imageobject or
     986                            ../audioobject or
     987                            ../videoobject">
     988              <xsl:text>0</xsl:text>
     989            </xsl:when>
    965990            <!-- The phrase is used only when contains TeX Math and output is FO -->
    966991            <xsl:when test="local-name($object)='textobject' and $object/phrase
     
    13171342    <xsl:when test="not($list/@continuation = 'continues')">
    13181343      <xsl:choose>
    1319         <xsl:when test="@startingnumber">
    1320           <xsl:value-of select="@startingnumber"/>
     1344        <xsl:when test="$list/@startingnumber">
     1345          <xsl:value-of select="$list/@startingnumber"/>
    13211346        </xsl:when>
    13221347        <xsl:when test="$pi-start != ''">
     
    13271352    </xsl:when>
    13281353    <xsl:otherwise>
    1329       <xsl:variable name="prevlist"
    1330         select="$list/preceding::orderedlist[1]"/>
     1354      <!-- match on previous list at same nesting level -->
     1355      <xsl:variable name="prevlist"
     1356       select="$list/preceding::orderedlist
     1357                [count($list/ancestor::orderedlist) = count(ancestor::orderedlist)][1]"/>
    13311358      <xsl:choose>
    13321359        <xsl:when test="count($prevlist) = 0">2</xsl:when>
     
    14051432    </xsl:otherwise>
    14061433  </xsl:choose>
     1434</xsl:template>
     1435
     1436<xsl:template match="orderedlist/listitem" mode="item-number">
     1437  <xsl:variable name="numeration">
     1438    <xsl:call-template name="list.numeration">
     1439      <xsl:with-param name="node" select="parent::orderedlist"/>
     1440    </xsl:call-template>
     1441  </xsl:variable>
     1442
     1443  <xsl:variable name="type">
     1444    <xsl:choose>
     1445      <xsl:when test="$numeration='arabic'">1.</xsl:when>
     1446      <xsl:when test="$numeration='loweralpha'">a.</xsl:when>
     1447      <xsl:when test="$numeration='lowerroman'">i.</xsl:when>
     1448      <xsl:when test="$numeration='upperalpha'">A.</xsl:when>
     1449      <xsl:when test="$numeration='upperroman'">I.</xsl:when>
     1450      <!-- What!? This should never happen -->
     1451      <xsl:otherwise>
     1452        <xsl:message>
     1453          <xsl:text>Unexpected numeration: </xsl:text>
     1454          <xsl:value-of select="$numeration"/>
     1455        </xsl:message>
     1456        <xsl:value-of select="1."/>
     1457      </xsl:otherwise>
     1458    </xsl:choose>
     1459  </xsl:variable>
     1460
     1461  <xsl:variable name="item-number">
     1462    <xsl:call-template name="orderedlist-item-number"/>
     1463  </xsl:variable>
     1464
     1465  <xsl:if test="parent::orderedlist/@inheritnum='inherit'
     1466                and ancestor::listitem[parent::orderedlist]">
     1467    <xsl:apply-templates select="ancestor::listitem[parent::orderedlist][1]"
     1468                         mode="item-number"/>
     1469  </xsl:if>
     1470
     1471  <xsl:number value="$item-number" format="{$type}"/>
    14071472</xsl:template>
    14081473
     
    15291594  </xsl:message>
    15301595  -->
    1531 
     1596   
    15321597  <xsl:choose>
    15331598    <xsl:when test="$print.ranges = 0 and count($years) &gt; 0">
     
    15551620          <!-- there weren't any years at all -->
    15561621        </xsl:when>
     1622        <!-- Just output a year with range in its text -->
     1623        <xsl:when test="contains($firstyear, '-') or contains($firstyear, ',')">
     1624          <xsl:value-of select="$firstyear"/>
     1625        </xsl:when>
    15571626        <xsl:when test="$firstyear = $lastyear">
    15581627          <xsl:value-of select="$firstyear"/>
     
    15701639        </xsl:otherwise>
    15711640      </xsl:choose>
     1641    </xsl:when>
     1642    <xsl:when test="contains($firstyear, '-') or contains($firstyear, ',')">
     1643      <!-- Just output a year with range in its text -->
     1644      <xsl:value-of select="$firstyear"/>
     1645      <xsl:if test="count($years) != 0">
     1646        <xsl:text>, </xsl:text>
     1647      </xsl:if>
     1648      <xsl:call-template name="copyright.years">
     1649        <xsl:with-param name="years"
     1650              select="$years[position() &gt; 1]"/>
     1651        <xsl:with-param name="firstyear" select="$years[1]"/>
     1652        <xsl:with-param name="nextyear" select="$years[1] + 1"/>
     1653        <xsl:with-param name="print.ranges" select="$print.ranges"/>
     1654        <xsl:with-param name="single.year.ranges"
     1655                select="$single.year.ranges"/>
     1656      </xsl:call-template>
    15721657    </xsl:when>
    15731658    <xsl:when test="$firstyear = 0">
     
    19792064    </xsl:choose>
    19802065  </xsl:template>
     2066
     2067
     2068<doc:template name="graphic.format.content-type" xmlns="">
     2069  <refpurpose>Returns mimetype for media format</refpurpose>
     2070  <refdescription id="graphic.format.content-type-desc">
     2071    <para>This takes as input a 'format' param and returns
     2072    a mimetype string.  It uses an xsl:choose after first
     2073    converting the input to all uppercase.</para>
     2074  </refdescription>
     2075</doc:template>
     2076<xsl:template name="graphic.format.content-type">
     2077  <xsl:param name="format"/>
     2078  <xsl:variable name="upperformat" select="translate($format,&lowercase;,&uppercase;)"/>
     2079  <xsl:choose>
     2080    <xsl:when test="$upperformat = ''"></xsl:when>
     2081    <xsl:when test="$upperformat = 'linespecific'"></xsl:when>
     2082    <xsl:when test="$upperformat = 'PS'">application/postscript</xsl:when>
     2083    <xsl:when test="$upperformat = 'PDF'">application/pdf</xsl:when>
     2084    <xsl:when test="$upperformat = 'PNG'">image/png</xsl:when>
     2085    <xsl:when test="$upperformat = 'SVG'">image/svg+xml</xsl:when>
     2086    <xsl:when test="$upperformat = 'JPG'">image/jpeg</xsl:when>
     2087    <xsl:when test="$upperformat = 'JPEG'">image/jpeg</xsl:when>
     2088    <xsl:when test="$upperformat = 'GIF'">image/gif</xsl:when>
     2089    <xsl:when test="$upperformat = 'GIF87A'">image/gif</xsl:when>
     2090    <xsl:when test="$upperformat = 'GIF89A'">image/gif</xsl:when>
     2091    <xsl:when test="$upperformat = 'ACC'">audio/acc</xsl:when>
     2092    <xsl:when test="$upperformat = 'MPG'">audio/mpeg</xsl:when>
     2093    <xsl:when test="$upperformat = 'MP1'">audio/mpeg</xsl:when>
     2094    <xsl:when test="$upperformat = 'MP2'">audio/mpeg</xsl:when>
     2095    <xsl:when test="$upperformat = 'MP3'">audio/mpeg</xsl:when>
     2096    <xsl:when test="$upperformat = 'M4A'">audio/mp4</xsl:when>
     2097    <xsl:when test="$upperformat = 'MPEG'">audio/mpeg</xsl:when>
     2098    <xsl:when test="$upperformat = 'WAV'">audio/wav</xsl:when>
     2099    <xsl:when test="$upperformat = 'MP4'">video/mp4</xsl:when>
     2100    <xsl:when test="$upperformat = 'M4V'">video/mp4</xsl:when>
     2101    <xsl:when test="$upperformat = 'OGV'">video/ogg</xsl:when>
     2102    <xsl:when test="$upperformat = 'OGG'">video/ogg</xsl:when>
     2103    <xsl:when test="$upperformat = 'WEBM'">video/webm</xsl:when>
     2104    <xsl:otherwise>
     2105        <xsl:value-of select="concat('image/', $upperformat)"/>
     2106    </xsl:otherwise>
     2107  </xsl:choose>
     2108</xsl:template>
     2109
    19812110</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.