Ignore:
Timestamp:
12/10/2013 11:37:38 PM (11 years ago)
Author:
Krejzi <krejzi@…>
Branches:
7.5-systemd, 7.6-systemd, 7.7-systemd, 7.8-systemd, 7.9-systemd
Children:
112db9d
Parents:
f2a5108
Message:

Import new branch

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

Location:
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml
Files:
47 added
14 moved

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/autotoc.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: autotoc.xsl 9692 2012-12-16 02:31:34Z dcramer $
    88     ********************************************************************
    99
     
    3838  <xsl:variable name="toc.title">
    3939    <xsl:if test="$toc.title.p">
    40       <p>
    41         <b>
    42           <xsl:call-template name="gentext">
    43             <xsl:with-param name="key">TableofContents</xsl:with-param>
    44           </xsl:call-template>
    45         </b>
    46       </p>
     40      <xsl:choose>
     41        <xsl:when test="$make.clean.html != 0">
     42          <div class="toc-title">
     43            <xsl:call-template name="gentext">
     44              <xsl:with-param name="key">TableofContents</xsl:with-param>
     45            </xsl:call-template>
     46          </div>
     47        </xsl:when>
     48        <xsl:otherwise>
     49          <p>
     50            <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
     51              <xsl:call-template name="gentext">
     52                <xsl:with-param name="key">TableofContents</xsl:with-param>
     53              </xsl:call-template>
     54            </strong>
     55          </p>
     56        </xsl:otherwise>
     57      </xsl:choose>
    4758    </xsl:if>
    4859  </xsl:variable>
     
    5970          <xsl:copy-of select="$toc.title"/>
    6071          <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
     72            <xsl:call-template name="toc.list.attributes">
     73              <xsl:with-param name="toc-context" select="$toc-context"/>
     74              <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
     75              <xsl:with-param name="nodes" select="$nodes"/>
     76            </xsl:call-template>
    6177            <xsl:call-template name="manual-toc">
    6278              <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
     
    7389              <xsl:copy-of select="$toc.title"/>
    7490              <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
     91                <xsl:call-template name="toc.list.attributes">
     92                  <xsl:with-param name="toc-context" select="$toc-context"/>
     93                  <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
     94                  <xsl:with-param name="nodes" select="$nodes"/>
     95                </xsl:call-template>
    7596                <xsl:apply-templates select="$nodes.plus" mode="toc">
    7697                  <xsl:with-param name="toc-context" select="$toc-context"/>
     
    85106              <xsl:copy-of select="$toc.title"/>
    86107              <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
     108                <xsl:call-template name="toc.list.attributes">
     109                  <xsl:with-param name="toc-context" select="$toc-context"/>
     110                  <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
     111                  <xsl:with-param name="nodes" select="$nodes"/>
     112                </xsl:call-template>
    87113                <xsl:apply-templates select="$nodes" mode="toc">
    88114                  <xsl:with-param name="toc-context" select="$toc-context"/>
     
    98124</xsl:template>
    99125
     126<xsl:template name="toc.list.attributes">
     127  <xsl:param name="toc-context" select="."/>
     128  <xsl:param name="toc.title.p" select="true()"/>
     129  <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
     130
     131  <xsl:attribute name="class">toc</xsl:attribute>
     132</xsl:template>
     133
    100134<xsl:template name="make.lots">
    101135  <xsl:param name="toc.params" select="''"/>
     
    116150    <xsl:call-template name="list.of.titles">
    117151      <xsl:with-param name="titles" select="'table'"/>
    118       <xsl:with-param name="nodes" select=".//table"/>
     152      <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
    119153    </xsl:call-template>
    120154  </xsl:if>
     
    151185    <xsl:with-param name="toc-context" select="$toc-context"/>
    152186    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
    153     <xsl:with-param name="nodes" select="book|setindex"/>
     187    <xsl:with-param name="nodes" select="book|setindex|set"/>
    154188  </xsl:call-template>
    155189</xsl:template>
     
    162196    <xsl:with-param name="toc-context" select="$toc-context"/>
    163197    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
    164     <xsl:with-param name="nodes" select="part|reference                                          |preface|chapter|appendix                                          |article                                          |bibliography|glossary|index                                          |refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
     198    <xsl:with-param name="nodes" select="part|reference                                          |preface|chapter|appendix                                          |article                                          |topic                                          |bibliography|glossary|index                                          |refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
    165199
    166200  </xsl:call-template>
     
    174208    <xsl:with-param name="toc-context" select="$toc-context"/>
    175209    <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
    176     <xsl:with-param name="nodes" select="section|sect1                                          |simplesect[$simplesect.in.toc != 0]                                          |refentry                                          |article|bibliography|glossary                                          |appendix|index                                          |bridgehead[not(@renderas)                                                      and $bridgehead.in.toc != 0]                                          |.//bridgehead[@renderas='sect1'                                                         and $bridgehead.in.toc != 0]"/>
     210    <xsl:with-param name="nodes" select="section|sect1                                          |simplesect[$simplesect.in.toc != 0]                                          |topic                                          |refentry                                          |article|bibliography|glossary                                          |appendix|index                                          |bridgehead[not(@renderas)                                                      and $bridgehead.in.toc != 0]                                          |.//bridgehead[@renderas='sect1'                                                         and $bridgehead.in.toc != 0]"/>
    177211  </xsl:call-template>
    178212</xsl:template>
     
    237271      <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
    238272      <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
     273      <xsl:when test="local-name(.) = 'topic'">1</xsl:when>
    239274      <xsl:when test="local-name(.) = 'simplesect'">
    240275        <!-- sigh... -->
     
    248283          <xsl:when test="local-name(..) = 'sect4'">5</xsl:when>
    249284          <xsl:when test="local-name(..) = 'sect5'">6</xsl:when>
     285          <xsl:when test="local-name(..) = 'topic'">2</xsl:when>
    250286          <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when>
    251287          <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when>
     
    277313      <xsl:with-param name="toc-context" select="$toc-context"/>
    278314    </xsl:call-template>
    279     <xsl:if test="$toc.listitem.type = 'li'                   and $toc.section.depth &gt; $depth and                    ( ($qanda.in.toc = 0 and count($nodes)&gt;0) or                     ($qanda.in.toc != 0 and count($nodes.plus)&gt;0) )                   and $toc.max.depth &gt; $depth.from.context">
     315    <xsl:if test="$toc.listitem.type = 'li' and                   ( (self::set or self::book or self::part) or                          $toc.section.depth &gt; $depth) and                    ( ($qanda.in.toc = 0 and count($nodes)&gt;0) or                     ($qanda.in.toc != 0 and count($nodes.plus)&gt;0) )                   and $toc.max.depth &gt; $depth.from.context">
    280316      <xsl:copy-of select="$subtoc.list"/>
    281317    </xsl:if>
    282318  </xsl:element>
    283   <xsl:if test="$toc.listitem.type != 'li'                 and $toc.section.depth &gt; $depth and                  ( ($qanda.in.toc = 0 and count($nodes)&gt;0) or                   ($qanda.in.toc != 0 and count($nodes.plus)&gt;0) )                 and $toc.max.depth &gt; $depth.from.context">
     319  <xsl:if test="$toc.listitem.type != 'li' and                   ( (self::set or self::book or self::part) or                          $toc.section.depth &gt; $depth) and                  ( ($qanda.in.toc = 0 and count($nodes)&gt;0) or                   ($qanda.in.toc != 0 and count($nodes.plus)&gt;0) )                 and $toc.max.depth &gt; $depth.from.context">
    284320    <xsl:copy-of select="$subtoc.list"/>
    285321  </xsl:if>
     
    336372  <xsl:call-template name="subtoc">
    337373    <xsl:with-param name="toc-context" select="$toc-context"/>
    338     <xsl:with-param name="nodes" select="part|reference                                          |preface|chapter|appendix                                          |article                                          |bibliography|glossary|index                                          |refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
     374    <xsl:with-param name="nodes" select="part|reference                                          |preface|chapter|appendix                                          |article                                          |topic                                          |bibliography|glossary|index                                          |refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
    339375  </xsl:call-template>
    340376</xsl:template>
     
    356392  <xsl:call-template name="subtoc">
    357393    <xsl:with-param name="toc-context" select="$toc-context"/>
    358     <xsl:with-param name="nodes" select="appendix|chapter|article                                          |index|glossary|bibliography                                          |preface|reference|refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
    359   </xsl:call-template>
    360 </xsl:template>
    361 
    362 <xsl:template match="preface|chapter|appendix|article" mode="toc">
    363   <xsl:param name="toc-context" select="."/>
    364 
    365   <xsl:call-template name="subtoc">
    366     <xsl:with-param name="toc-context" select="$toc-context"/>
    367     <xsl:with-param name="nodes" select="section|sect1                                          |simplesect[$simplesect.in.toc != 0]                                          |refentry                                          |glossary|bibliography|index                                          |bridgehead[$bridgehead.in.toc != 0]"/>
     394    <xsl:with-param name="nodes" select="appendix|chapter|article|topic                                          |index|glossary|bibliography                                          |preface|reference|refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
     395  </xsl:call-template>
     396</xsl:template>
     397
     398<xsl:template match="preface|chapter|appendix|article|topic" mode="toc">
     399  <xsl:param name="toc-context" select="."/>
     400
     401  <xsl:call-template name="subtoc">
     402    <xsl:with-param name="toc-context" select="$toc-context"/>
     403    <xsl:with-param name="nodes" select="section|sect1                                          |simplesect[$simplesect.in.toc != 0]                                          |topic                                          |refentry                                          |glossary|bibliography|index                                          |bridgehead[$bridgehead.in.toc != 0]"/>
    368404  </xsl:call-template>
    369405</xsl:template>
     
    425461  <xsl:call-template name="subtoc">
    426462    <xsl:with-param name="toc-context" select="$toc-context"/>
    427     <xsl:with-param name="nodes" select="section                                          |bridgehead[$bridgehead.in.toc != 0]"/>
     463    <xsl:with-param name="nodes" select="section|refentry                                          |simplesect[$simplesect.in.toc != 0]                                          |bridgehead[$bridgehead.in.toc != 0]"/>
     464  </xsl:call-template>
     465</xsl:template>
     466
     467<xsl:template match="topic" mode="toc">
     468  <xsl:param name="toc-context" select="."/>
     469
     470  <xsl:call-template name="subtoc">
     471    <xsl:with-param name="toc-context" select="$toc-context"/>
     472    <xsl:with-param name="nodes" select="section|refentry                                          |simplesect[$simplesect.in.toc != 0]                                          |bridgehead[$bridgehead.in.toc != 0]"/>
    428473  </xsl:call-template>
    429474</xsl:template>
     
    496541        <!-- * is allowed in refpurpose; so we need to run -->
    497542        <!-- * apply-templates on refpurpose here, instead of value-of  -->
    498         <xsl:apply-templates select="refnamediv/refpurpose"/>
     543        <xsl:apply-templates select="refnamediv/refpurpose" mode="no.anchor.mode"/>
    499544      </xsl:if>
    500545    </span>
     
    519564  <xsl:param name="toc-context" select="."/>
    520565  <xsl:param name="tocentry"/>
     566  <xsl:param name="toc.title.p" select="true()"/>
     567  <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
    521568
    522569  <!-- be careful, we don't want to change the current document to the other tree! -->
     
    546593    <xsl:if test="$tocentry/*">
    547594      <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
     595        <xsl:call-template name="toc.list.attributes">
     596          <xsl:with-param name="toc-context" select="$toc-context"/>
     597          <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
     598          <xsl:with-param name="nodes" select="$nodes"/>
     599        </xsl:call-template>
    548600        <xsl:call-template name="manual-toc">
    549601          <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
     
    569621  <xsl:if test="$nodes">
    570622    <div class="list-of-{$titles}s">
    571       <p>
    572         <b>
    573           <xsl:call-template name="gentext">
    574             <xsl:with-param name="key">
    575               <xsl:choose>
    576                 <xsl:when test="$titles='table'">ListofTables</xsl:when>
    577                 <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
    578                 <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
    579                 <xsl:when test="$titles='example'">ListofExamples</xsl:when>
    580                 <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
    581                 <xsl:otherwise>ListofUnknown</xsl:otherwise>
    582               </xsl:choose>
    583             </xsl:with-param>
    584           </xsl:call-template>
    585         </b>
    586       </p>
     623      <xsl:choose>
     624        <xsl:when test="$make.clean.html != 0">
     625          <div class="toc-title">
     626            <xsl:call-template name="gentext">
     627              <xsl:with-param name="key">
     628                <xsl:choose>
     629                  <xsl:when test="$titles='table'">ListofTables</xsl:when>
     630                  <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
     631                  <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
     632                  <xsl:when test="$titles='example'">ListofExamples</xsl:when>
     633                  <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
     634                  <xsl:otherwise>ListofUnknown</xsl:otherwise>
     635                </xsl:choose>
     636              </xsl:with-param>
     637            </xsl:call-template>
     638          </div>
     639        </xsl:when>
     640        <xsl:otherwise>
     641          <p>
     642            <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
     643              <xsl:call-template name="gentext">
     644                <xsl:with-param name="key">
     645                  <xsl:choose>
     646                    <xsl:when test="$titles='table'">ListofTables</xsl:when>
     647                    <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
     648                    <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
     649                    <xsl:when test="$titles='example'">ListofExamples</xsl:when>
     650                    <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
     651                    <xsl:otherwise>ListofUnknown</xsl:otherwise>
     652                  </xsl:choose>
     653                </xsl:with-param>
     654              </xsl:call-template>
     655            </strong>
     656          </p>
     657        </xsl:otherwise>
     658      </xsl:choose>
    587659
    588660      <xsl:element name="{$toc.list.type}" namespace="http://www.w3.org/1999/xhtml">
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/chunk.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: chunk.xsl 6910 2007-06-28 23:23:30Z xmldoc $
    88     ********************************************************************
    99
     
    2323     customization should import mydocbook.xsl instead of
    2424     docbook.xsl.  -->
    25 <xsl:import href="docbook.xsl"/>
     25<xsl:import href="docbook-no-doctype.xsl"/>
    2626
    2727<!-- chunk-common.xsl contains all the named templates for chunking.
     
    4848     apply the chunking version instead of the original
    4949     non-chunking version to format an element.  -->
    50 <xsl:include href="profile-chunk-code.xsl"/>
     50<xsl:include href="chunk-code.xsl"/>
    5151
    5252</xsl:stylesheet>
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/chunker.xsl

    rf2a5108 rb1a51ac1  
    22<!--This file was created automatically by html2xhtml-->
    33<!--from the HTML stylesheets.-->
    4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:exsl="http://exslt.org/common" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc" extension-element-prefixes="saxon redirect lxslt exsl">
     4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:exsl="http://exslt.org/common" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="saxon lxslt redirect exsl doc" extension-element-prefixes="saxon redirect lxslt exsl">
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: chunker.xsl 9656 2012-10-29 18:09:53Z bobstayton $
    88     ********************************************************************
    99
     
    2929<xsl:param name="chunker.output.media-type" select="''"/>
    3030<xsl:param name="chunker.output.cdata-section-elements" select="''"/>
    31 <xsl:param name="chunker.output.quiet" select="0"/>
     31
     32<!-- Make sure base.dir has a trailing slash now -->
     33<xsl:param name="chunk.base.dir">
     34  <xsl:choose>
     35    <xsl:when test="string-length($base.dir) = 0"/>
     36    <!-- make sure to add trailing slash if omitted by user -->
     37    <xsl:when test="substring($base.dir, string-length($base.dir), 1) = '/'">
     38      <xsl:value-of select="$base.dir"/>
     39    </xsl:when>
     40    <xsl:otherwise>
     41      <xsl:value-of select="concat($base.dir, '/')"/>
     42    </xsl:otherwise>
     43  </xsl:choose>
     44</xsl:param>
    3245
    3346<xsl:param name="saxon.character.representation" select="'entity;decimal'"/>
     
    7184<xsl:template name="write.chunk">
    7285  <xsl:param name="filename" select="''"/>
    73   <xsl:param name="quiet" select="$chunker.output.quiet"/>
     86  <xsl:param name="quiet" select="$chunk.quietly"/>
    7487  <xsl:param name="suppress-context-node-name" select="0"/>
    7588  <xsl:param name="message-prolog"/>
     
    239252<xsl:template name="write.chunk.with.doctype">
    240253  <xsl:param name="filename" select="''"/>
    241   <xsl:param name="quiet" select="$chunker.output.quiet"/>
     254  <xsl:param name="quiet" select="$chunk.quietly"/>
    242255
    243256  <xsl:param name="method" select="$chunker.output.method"/>
     
    271284<xsl:template name="write.text.chunk">
    272285  <xsl:param name="filename" select="''"/>
    273   <xsl:param name="quiet" select="$chunker.output.quiet"/>
     286  <xsl:param name="quiet" select="$chunk.quietly"/>
    274287  <xsl:param name="suppress-context-node-name" select="0"/>
    275288  <xsl:param name="message-prolog"/>
     
    289302    <xsl:with-param name="encoding" select="$encoding"/>
    290303    <xsl:with-param name="indent" select="'no'"/>
    291     <xsl:with-param name="omit-xml-declaration" select="'no'"/>
     304    <xsl:with-param name="omit-xml-declaration" select="'yes'"/>
    292305    <xsl:with-param name="standalone" select="'no'"/>
    293306    <xsl:with-param name="doctype-public"/>
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/division.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: division.xsl 9366 2012-05-12 23:44:25Z bobstayton $
    88     ********************************************************************
    99
     
    1919  <xsl:call-template name="id.warning"/>
    2020
    21   <div>
    22     <xsl:apply-templates select="." mode="class.attribute"/>
     21  <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
     22    <xsl:apply-templates select="." mode="common.html.attributes"/>
     23    <xsl:call-template name="id.attribute">
     24      <xsl:with-param name="conditional" select="0"/>
     25    </xsl:call-template>
    2326    <xsl:call-template name="dir">
    2427      <xsl:with-param name="inherit" select="1"/>
     
    4952
    5053    <xsl:apply-templates/>
    51   </div>
     54  </xsl:element>
    5255</xsl:template>
    5356
     
    6366
    6467  <div>
    65     <xsl:apply-templates select="." mode="class.attribute"/>
    66     <xsl:call-template name="dir">
    67       <xsl:with-param name="inherit" select="1"/>
    68     </xsl:call-template>
    69     <xsl:call-template name="language.attribute"/>
    70     <xsl:if test="$generate.id.attributes != 0">
    71       <xsl:attribute name="id">
    72         <xsl:call-template name="object.id"/>
    73       </xsl:attribute>
    74     </xsl:if>
     68    <xsl:apply-templates select="." mode="common.html.attributes"/>
     69    <xsl:call-template name="id.attribute">
     70      <xsl:with-param name="conditional" select="0"/>
     71    </xsl:call-template>
    7572
    7673    <xsl:call-template name="book.titlepage"/>
    7774
    7875    <xsl:apply-templates select="dedication" mode="dedication"/>
     76    <xsl:apply-templates select="acknowledgements" mode="acknowledgements"/>
    7977
    8078    <xsl:variable name="toc.params">
     
    109107
    110108  <div>
    111     <xsl:apply-templates select="." mode="class.attribute"/>
    112     <xsl:call-template name="dir">
    113       <xsl:with-param name="inherit" select="1"/>
    114     </xsl:call-template>
    115     <xsl:call-template name="language.attribute"/>
    116     <xsl:if test="$generate.id.attributes != 0">
    117       <xsl:attribute name="id">
    118         <xsl:call-template name="object.id"/>
    119       </xsl:attribute>
    120     </xsl:if>
     109    <xsl:apply-templates select="." mode="common.html.attributes"/>
     110    <xsl:call-template name="id.attribute">
     111      <xsl:with-param name="conditional" select="0"/>
     112    </xsl:call-template>
    121113
    122114    <xsl:call-template name="part.titlepage"/>
     
    153145
    154146  <div>
    155     <xsl:apply-templates select="." mode="class.attribute"/>
    156     <xsl:call-template name="dir">
    157       <xsl:with-param name="inherit" select="1"/>
    158     </xsl:call-template>
    159     <xsl:call-template name="language.attribute"/>
    160     <xsl:if test="$generate.id.attributes != 0">
    161       <xsl:attribute name="id">
    162         <xsl:call-template name="object.id"/>
    163       </xsl:attribute>
    164     </xsl:if>
     147    <xsl:call-template name="common.html.attributes"/>
     148    <xsl:call-template name="id.attribute">
     149      <xsl:with-param name="conditional" select="0"/>
     150    </xsl:call-template>
    165151
    166152    <xsl:call-template name="partintro.titlepage"/>
     
    193179<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
    194180  <h3>
    195     <i><xsl:apply-templates/></i>
     181    <em xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></em>
    196182  </h3>
    197183</xsl:template>
     
    214200  <h1>
    215201    <xsl:attribute name="class">title</xsl:attribute>
    216     <xsl:if test="$generate.id.attributes = 0">
    217       <xsl:call-template name="anchor">
    218         <xsl:with-param name="node" select="$node"/>
    219         <xsl:with-param name="conditional" select="0"/>
    220       </xsl:call-template>
    221     </xsl:if>
    222       <xsl:apply-templates select="$node" mode="object.title.markup">
     202    <xsl:call-template name="anchor">
     203      <xsl:with-param name="node" select="$node"/>
     204      <xsl:with-param name="conditional" select="0"/>
     205    </xsl:call-template>
     206    <xsl:apply-templates select="$node" mode="object.title.markup">
    223207      <xsl:with-param name="allow-anchors" select="1"/>
    224208    </xsl:apply-templates>
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/ebnf.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: ebnf.xsl 9664 2012-11-07 20:02:17Z bobstayton $
    88     ********************************************************************
    99
     
    1717<referenceinfo xmlns="http://www.w3.org/1999/xhtml">
    1818<releaseinfo role="meta">
    19 $Id$
     19$Id: ebnf.xsl 9664 2012-11-07 20:02:17Z bobstayton $
    2020</releaseinfo>
    2121<author><surname>Walsh</surname>
     
    6565    <xsl:attribute name="summary">
    6666      <xsl:text>EBNF</xsl:text>
    67       <xsl:if test="title">
     67      <xsl:if test="title|info/title">
    6868        <xsl:text> for </xsl:text>
    69         <xsl:value-of select="title"/>
     69        <xsl:value-of select="title|info/title[1]"/>
    7070      </xsl:if>
    7171    </xsl:attribute>
    7272
    73     <xsl:if test="title">
     73    <xsl:if test="title|info/title">
    7474      <tr>
    75         <th align="left" valign="top">
     75        <th align="{$direction.align.start}" valign="top">
    7676          <xsl:apply-templates select="." mode="class.attribute"/>
    77           <xsl:apply-templates select="title"/>
     77          <xsl:apply-templates select="title|info/title[1]"/>
    7878        </th>
    7979      </tr>
     
    105105  <xsl:param name="recap" select="false()"/>
    106106  <tr>
    107     <td align="left" valign="top" width="3%">
     107    <td align="{$direction.align.start}" valign="top" width="3%">
    108108      <xsl:text>[</xsl:text>
    109       <xsl:number count="production" level="any"/>
     109      <xsl:apply-templates select="." mode="label.markup"/>
    110110      <xsl:text>]</xsl:text>
    111111    </td>
    112     <td align="right" valign="top" width="10%">
     112    <td align="{$direction.align.end}" valign="top" width="10%">
    113113      <xsl:choose>
    114114        <xsl:when test="$recap">
     
    123123        </xsl:when>
    124124        <xsl:otherwise>
     125          <xsl:call-template name="id.attribute"/>
    125126          <xsl:call-template name="anchor"/>
    126127          <xsl:apply-templates select="lhs"/>
     
    135136      <xsl:copy-of select="$ebnf.statement.terminator"/>
    136137    </td>
    137     <td align="left" valign="top" width="30%">
     138    <td align="{$direction.align.start}" valign="top" width="30%">
    138139      <xsl:choose>
    139140        <xsl:when test="rhs/lineannotation|constraint">
     
    315316  <div>
    316317    <xsl:apply-templates select="." mode="class.attribute"/>
     318    <xsl:call-template name="id.attribute"/>
    317319    <xsl:call-template name="anchor"/>
    318320    <xsl:apply-templates/>
     
    321323
    322324<xsl:template match="constraintdef/title">
    323   <p><b><xsl:apply-templates/></b></p>
     325  <p><strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates/></strong></p>
    324326</xsl:template>
    325327
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/graphics.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: graphics.xsl 9710 2013-01-22 19:34:18Z bobstayton $
    88     ********************************************************************
    99
     
    3131  <xsl:param name="ext"/>
    3232  <xsl:variable name="lcext" select="translate($ext,                                        'ABCDEFGHIJKLMNOPQRSTUVWXYZ',                                        'abcdefghijklmnopqrstuvwxyz')"/>
    33   <xsl:if test="$lcext = 'svg'              or $lcext = 'png'              or $lcext = 'jpeg'              or $lcext = 'jpg'              or $lcext = 'avi'              or $lcext = 'mpg'              or $lcext = 'mpeg'              or $lcext = 'qt'              or $lcext = 'gif'              or $lcext = 'bmp'">1</xsl:if>
     33  <xsl:if test="$lcext = 'svg'              or $lcext = 'png'              or $lcext = 'jpeg'              or $lcext = 'jpg'              or $lcext = 'avi'              or $lcext = 'mpg'              or $lcext = 'mp4'              or $lcext = 'mpeg'              or $lcext = 'qt'              or $lcext = 'gif'              or $lcext = 'acc'              or $lcext = 'mp1'              or $lcext = 'mp2'              or $lcext = 'mp3'              or $lcext = 'mp4'              or $lcext = 'm4v'              or $lcext = 'm4a'              or $lcext = 'wav'              or $lcext = 'ogv'              or $lcext = 'ogg'              or $lcext = 'webm'              or $lcext = 'bmp'">1</xsl:if>
    3434</xsl:template>
    3535
     
    3838<xsl:template match="screenshot">
    3939  <div>
    40     <xsl:apply-templates select="." mode="class.attribute"/>
     40    <xsl:apply-templates select="." mode="common.html.attributes"/>
     41    <xsl:call-template name="id.attribute"/>
     42    <xsl:call-template name="anchor"/>
    4143    <xsl:apply-templates/>
    4244  </div>
     45</xsl:template>
     46
     47<xsl:template match="screenshot/title">
     48  <xsl:call-template name="formal.object.heading">
     49    <xsl:with-param name="object" select=".."/>
     50  </xsl:call-template>
    4351</xsl:template>
    4452
     
    108116
    109117       Scale can be problematic. Scale applies to the contentwidth, so
    110        a scale of 50 when a contentwidth is not specified is analogous to a
     118       a scale of 50 when a contentwidth is not specified is analagous to a
    111119       width of 50%. (If a contentwidth is specified, the scaling factor can
    112120       be applied to that value and no problem exists.)
     
    244252    <!-- This funny compound test works around a bug in XSLTC -->
    245253    <xsl:choose>
    246       <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
     254      <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0                       and not(@format='SVG')">
    247255        <xsl:choose>
    248256          <xsl:when test="function-available('simg:getWidth')">
     
    277285    <!-- This funny compound test works around a bug in XSLTC -->
    278286    <xsl:choose>
    279       <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
     287      <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0                       and not(@format='SVG')">
    280288        <xsl:choose>
    281289          <xsl:when test="function-available('simg:getDepth')">
     
    339347        </xsl:call-template>
    340348      </xsl:variable>
    341       <xsl:value-of select="$cwidth.in.points div 72.0 * $pixels.per.inch * $scale"/>
     349      <xsl:value-of select="round($cwidth.in.points div 72.0 * $pixels.per.inch * $scale)"/>
    342350    </xsl:if>
    343351  </xsl:variable>
     
    406414        </xsl:call-template>
    407415      </xsl:variable>
    408       <xsl:value-of select="$cdepth.in.points div 72.0 * $pixels.per.inch * $scale"/>
     416      <xsl:value-of select="round($cdepth.in.points div 72.0 * $pixels.per.inch * $scale)"/>
    409417    </xsl:if>
    410418  </xsl:variable>
     
    487495    <xsl:choose>
    488496      <xsl:when test="@format = 'SVG'">
    489         <object data="{$output_filename}" type="image/svg+xml">
    490           <xsl:call-template name="process.image.attributes">
     497        <object type="image/svg+xml">
     498          <xsl:attribute name="data">
     499            <xsl:choose>
     500              <xsl:when test="$img.src.path != '' and                            $tag = 'img' and       not(starts-with($output_filename, '/')) and       not(contains($output_filename, '://'))">
     501                <xsl:value-of select="$img.src.path"/>
     502              </xsl:when>
     503           </xsl:choose>
     504           <xsl:value-of select="$output_filename"/>
     505          </xsl:attribute>
     506          <xsl:call-template name="process.image.attributes">
    491507            <!--xsl:with-param name="alt" select="$alt"/ there's no alt here-->
    492508            <xsl:with-param name="html.depth" select="$html.depth"/>
     
    510526          </xsl:if>
    511527          <xsl:if test="$use.embed.for.svg != 0">
    512             <embed src="{$output_filename}" type="image/svg+xml">
     528            <embed type="image/svg+xml">
     529              <xsl:attribute name="src">
     530                <xsl:choose>
     531                  <xsl:when test="$img.src.path != '' and       $tag = 'img' and       not(starts-with($output_filename, '/')) and       not(contains($output_filename, '://'))">
     532                    <xsl:value-of select="$img.src.path"/>
     533                  </xsl:when>
     534                </xsl:choose>
     535                <xsl:value-of select="$output_filename"/>
     536              </xsl:attribute>
    513537              <xsl:call-template name="process.image.attributes">
    514538                <!--xsl:with-param name="alt" select="$alt"/ there's no alt here -->
     
    579603                </xsl:when>
    580604                <xsl:when test="ancestor::figure">
    581                   <xsl:value-of select="normalize-space(ancestor::figure/title)"/>
     605                  <xsl:variable name="fig.title">
     606                    <xsl:apply-templates select="ancestor::figure/title/node()"/>
     607                  </xsl:variable>
     608                  <xsl:value-of select="normalize-space($fig.title)"/>
    582609                </xsl:when>
    583610              </xsl:choose>
     
    607634  <xsl:choose>
    608635    <xsl:when test="$use.viewport">
    609       <table border="0" summary="manufactured viewport for HTML img" cellspacing="0" cellpadding="0">
     636      <table border="{$table.border.off}">
     637        <xsl:if test="$div.element != 'section'">
     638          <xsl:attribute name="summary">manufactured viewport for HTML img</xsl:attribute>
     639        </xsl:if>
     640        <xsl:if test="$css.decoration != ''">
     641          <xsl:attribute name="style">cellpadding: 0; cellspacing: 0;</xsl:attribute>
     642        </xsl:if>
    610643        <xsl:if test="$html.width != ''">
    611644          <xsl:attribute name="width">
     
    939972  </xsl:if>
    940973
     974  <!-- Turn off longdesc attribute since not supported by browsers
    941975  <xsl:if test="$longdesc != ''">
    942976    <xsl:attribute name="longdesc">
     
    944978    </xsl:attribute>
    945979  </xsl:if>
     980  -->
    946981
    947982  <xsl:if test="@align and $viewport = 0">
     
    955990    </xsl:attribute>
    956991  </xsl:if>
    957 </xsl:template>
     992
     993  <xsl:call-template name="extension.process.image.attributes"/>
     994</xsl:template>
     995
     996<xsl:template name="extension.process.image.attributes"/>
    958997
    959998<!-- ==================================================================== -->
     
    9621001  <xsl:choose>
    9631002    <xsl:when test="parent::inlineequation">
    964       <xsl:call-template name="anchor"/>
    965       <xsl:call-template name="process.image"/>
     1003      <span>
     1004        <xsl:call-template name="id.attribute"/>
     1005        <xsl:call-template name="anchor"/>
     1006        <xsl:call-template name="process.image"/>
     1007      </span>
    9661008    </xsl:when>
    9671009    <xsl:otherwise>
    9681010      <div>
     1011        <xsl:call-template name="id.attribute"/>
    9691012        <xsl:if test="@align">
    9701013          <xsl:attribute name="align">
     
    10121055        </xsl:when>
    10131056        <xsl:otherwise>
    1014           <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" href="{$filename}"/>
    1015         </xsl:otherwise>
     1057          <xsl:message terminate="yes">
     1058            <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/>
     1059            <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text>
     1060          </xsl:message>
     1061        </xsl:otherwise>
    10161062      </xsl:choose>
    10171063    </xsl:when>
     
    10421088
    10431089  <div>
    1044     <xsl:apply-templates select="." mode="class.attribute"/>
     1090    <xsl:apply-templates select="." mode="common.html.attributes"/>
    10451091    <xsl:if test="$align != '' ">
    10461092      <xsl:attribute name="align">
     
    10481094      </xsl:attribute>
    10491095    </xsl:if>
     1096    <xsl:call-template name="id.attribute"/>
    10501097    <xsl:call-template name="anchor"/>
    10511098
     
    10571104<xsl:template match="inlinemediaobject">
    10581105  <span>
    1059     <xsl:apply-templates select="." mode="class.attribute"/>
     1106    <xsl:apply-templates select="." mode="common.html.attributes"/>
     1107    <xsl:call-template name="id.attribute"/>
    10601108    <xsl:call-template name="anchor"/>
    10611109    <xsl:call-template name="select.mediaobject"/>
     
    10721120<xsl:template match="imageobjectco">
    10731121  <xsl:call-template name="anchor"/>
    1074   <xsl:apply-templates select="imageobject"/>
     1122  <xsl:choose>
     1123    <!-- select one imageobject? -->
     1124    <xsl:when test="$use.role.for.mediaobject != 0 and                     count(imageobject) &gt; 1 and                     imageobject[@role]">
     1125      <xsl:variable name="olist" select="imageobject"/>
     1126   
     1127      <xsl:variable name="object.index">
     1128        <xsl:call-template name="select.mediaobject.index">
     1129          <xsl:with-param name="olist" select="$olist"/>
     1130          <xsl:with-param name="count" select="1"/>
     1131        </xsl:call-template>
     1132      </xsl:variable>
     1133   
     1134      <xsl:variable name="object" select="$olist[position() = $object.index]"/>
     1135   
     1136      <xsl:apply-templates select="$object"/>
     1137    </xsl:when>
     1138    <xsl:otherwise>
     1139      <!-- otherwise process them all -->
     1140      <xsl:apply-templates select="imageobject"/>
     1141    </xsl:otherwise>
     1142  </xsl:choose>
     1143
    10751144  <xsl:apply-templates select="calloutlist"/>
     1145
    10761146</xsl:template>
    10771147
     
    11301200      <xsl:call-template name="process.image">
    11311201        <xsl:with-param name="alt">
    1132           <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/>
     1202          <xsl:choose>
     1203            <xsl:when test="ancestor::mediaobject/alt">
     1204              <xsl:apply-templates select="ancestor::mediaobject/alt"/>
     1205            </xsl:when>
     1206            <xsl:otherwise>
     1207              <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/>
     1208            </xsl:otherwise>
     1209          </xsl:choose>
    11331210        </xsl:with-param>
    11341211        <xsl:with-param name="longdesc">
     
    11651242              </xsl:when>
    11661243              <xsl:otherwise>
    1167                 <xsl:value-of select="$base.dir"/>
     1244                <xsl:value-of select="$chunk.base.dir"/>
    11681245              </xsl:otherwise>
    11691246            </xsl:choose>
     
    12421319  <xsl:variable name="this.uri">
    12431320    <xsl:call-template name="make-relative-filename">
    1244       <xsl:with-param name="base.dir" select="$base.dir"/>
     1321      <xsl:with-param name="base.dir" select="$chunk.base.dir"/>
    12451322      <xsl:with-param name="base.name">
    12461323        <xsl:call-template name="href.target.uri"/>
     
    12571334  </xsl:variable>
    12581335
    1259   <div class="longdesc-link" align="right">
     1336  <div class="longdesc-link" align="{$direction.align.end}">
    12601337    <br clear="all"/>
    12611338    <span class="longdesc-link">
     
    12691346<!-- ==================================================================== -->
    12701347
     1348<xsl:template match="mediaobject/alt">
     1349  <xsl:apply-templates/>
     1350</xsl:template>
     1351
    12711352<xsl:template match="videoobject">
    12721353  <xsl:apply-templates select="videodata"/>
     
    12771358    <xsl:with-param name="tag" select="'embed'"/>
    12781359    <xsl:with-param name="alt">
    1279       <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
     1360      <xsl:choose>
     1361        <xsl:when test="ancestor::mediaobject/alt">
     1362          <xsl:apply-templates select="ancestor::mediaobject/alt"/>
     1363        </xsl:when>
     1364        <xsl:otherwise>
     1365          <xsl:apply-templates select="(ancestor::mediaobject/textobject/phrase)[1]"/>
     1366        </xsl:otherwise>
     1367      </xsl:choose>
    12801368    </xsl:with-param>
    12811369  </xsl:call-template>
     
    12921380    <xsl:with-param name="tag" select="'embed'"/>
    12931381    <xsl:with-param name="alt">
    1294       <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
     1382      <xsl:choose>
     1383        <xsl:when test="ancestor::mediaobject/alt">
     1384          <xsl:apply-templates select="ancestor::mediaobject/alt"/>
     1385        </xsl:when>
     1386        <xsl:otherwise>
     1387          <xsl:apply-templates select="(ancestor::mediaobject/textobject/phrase)[1]"/>
     1388        </xsl:otherwise>
     1389      </xsl:choose>
    12951390    </xsl:with-param>
    12961391  </xsl:call-template>
     
    13431438    </xsl:when>
    13441439    <xsl:otherwise>
    1345       <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" href="{$filename}"/>
     1440      <xsl:message terminate="yes">
     1441        <xsl:text>Cannot insert </xsl:text><xsl:value-of select="$filename"/>
     1442        <xsl:text>. Check use.extensions and textinsert.extension parameters.</xsl:text>
     1443      </xsl:message>
    13461444    </xsl:otherwise>
    13471445  </xsl:choose>
     
    13521450<xsl:template match="caption">
    13531451  <div>
    1354     <xsl:apply-templates select="." mode="class.attribute"/>
     1452    <xsl:apply-templates select="." mode="common.html.attributes"/>
     1453    <xsl:call-template name="id.attribute"/>
    13551454    <xsl:if test="@align = 'right' or @align = 'left' or @align='center'">
    13561455      <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/inline.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: inline.xsl 9663 2012-11-06 19:09:16Z bobstayton $
    88     ********************************************************************
    99
     
    1313
    1414     ******************************************************************** -->
     15
     16<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/>
     17<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/>
     18
    1519<xsl:template name="simple.xlink">
    1620  <xsl:param name="node" select="."/>
     
    1822    <xsl:apply-templates/>
    1923  </xsl:param>
    20   <xsl:param name="a.target"/>
    2124  <xsl:param name="linkend" select="$node/@linkend"/>
    2225  <xsl:param name="xhref" select="$node/@xlink:href"/>
     26
     27  <!-- Support for @xlink:show -->
     28  <xsl:variable name="target.show">
     29    <xsl:choose>
     30      <xsl:when test="$node/@xlink:show = 'new'">_blank</xsl:when>
     31      <xsl:when test="$node/@xlink:show = 'replace'">_top</xsl:when>
     32      <xsl:otherwise/>
     33    </xsl:choose>
     34  </xsl:variable>
    2335
    2436  <xsl:variable name="link">
     
    3951        <xsl:variable name="is.olink">
    4052          <xsl:choose>
    41             <!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
     53            <!-- If xlink:role="http://docbook.org/xlink/role/olink" -->
    4254            <!-- and if the href contains # -->
    43             <xsl:when test="contains($xhref,'#') and           @xlink:role = $xolink.role">1</xsl:when>
     55            <xsl:when test="contains($xhref,'#') and                  @xlink:role = $xolink.role">1</xsl:when>
    4456            <xsl:otherwise>0</xsl:otherwise>
    4557          </xsl:choose>
     
    4759
    4860        <xsl:choose>
     61          <xsl:when test="$is.olink = 1">
     62            <xsl:call-template name="olink">
     63              <xsl:with-param name="content" select="$content"/>
     64            </xsl:call-template>
     65          </xsl:when>
     66
    4967          <xsl:when test="$is.idref = 1">
    5068
     
    7391              <xsl:otherwise>
    7492                <a>
    75                   <xsl:apply-templates select="." mode="class.attribute"/>
     93                  <xsl:apply-templates select="." mode="common.html.attributes"/>
     94                  <xsl:call-template name="id.attribute"/>
    7695
    7796                  <xsl:attribute name="href">
     
    92111                  </xsl:choose>
    93112
    94                   <xsl:if test="$a.target">
     113                  <xsl:if test="$target.show !=''">
    95114                    <xsl:attribute name="target">
    96                       <xsl:value-of select="$a.target"/>
     115                      <xsl:value-of select="$target.show"/>
    97116                    </xsl:attribute>
    98117                  </xsl:if>
     
    105124          </xsl:when>
    106125
    107           <xsl:when test="$is.olink = 1">
    108             <xsl:call-template name="olink">
    109               <xsl:with-param name="content" select="$content"/>
    110             </xsl:call-template>
    111           </xsl:when>
    112 
    113126          <!-- otherwise it's a URI -->
    114127          <xsl:otherwise>
    115128            <a>
    116               <xsl:apply-templates select="." mode="class.attribute"/>
     129              <xsl:apply-templates select="." mode="common.html.attributes"/>
     130              <xsl:call-template name="id.attribute"/>
    117131              <xsl:attribute name="href">
    118132                <xsl:value-of select="$xhref"/>
     
    123137                </xsl:attribute>
    124138              </xsl:if>
     139
     140              <!-- For URIs, use @xlink:show if defined, otherwise use ulink.target -->
     141              <xsl:choose>
     142                <xsl:when test="$target.show !=''">
     143                  <xsl:attribute name="target">
     144                    <xsl:value-of select="$target.show"/>
     145                  </xsl:attribute>
     146                </xsl:when>
     147                <xsl:when test="$ulink.target !=''">
     148                  <xsl:attribute name="target">
     149                    <xsl:value-of select="$ulink.target"/>
     150                  </xsl:attribute>
     151                </xsl:when>
     152              </xsl:choose>
     153             
    125154              <xsl:copy-of select="$content"/>
    126155            </a>
     
    138167
    139168        <a>
    140           <xsl:apply-templates select="." mode="class.attribute"/>
     169          <xsl:apply-templates select="." mode="common.html.attributes"/>
     170          <xsl:call-template name="id.attribute"/>
    141171          <xsl:attribute name="href">
    142172            <xsl:call-template name="href.target">
     
    184214      <xsl:value-of select="local-name(.)"/>
    185215    </xsl:attribute>
     216    <xsl:call-template name="id.attribute"/>
    186217    <xsl:call-template name="dir"/>
    187218    <xsl:call-template name="generate.html.title"/>
     
    201232  </xsl:param>
    202233  <code>
    203     <xsl:apply-templates select="." mode="class.attribute"/>
    204     <xsl:call-template name="dir"/>
    205     <xsl:call-template name="generate.html.title"/>
     234    <xsl:apply-templates select="." mode="common.html.attributes"/>
     235    <xsl:call-template name="id.attribute"/>
    206236    <xsl:copy-of select="$content"/>
    207237    <xsl:call-template name="apply-annotations"/>
     
    220250
    221251  <span>
    222     <xsl:apply-templates select="." mode="class.attribute"/>
    223     <xsl:call-template name="generate.html.title"/>
    224     <xsl:call-template name="dir"/>
     252    <xsl:apply-templates select="." mode="common.html.attributes"/>
     253    <xsl:call-template name="id.attribute"/>
    225254
    226255    <!-- don't put <strong> inside figure, example, or table titles -->
     
    249278  </xsl:param>
    250279  <em>
    251     <xsl:apply-templates select="." mode="class.attribute"/>
    252     <xsl:call-template name="generate.html.title"/>
    253     <xsl:call-template name="dir"/>
     280    <xsl:call-template name="common.html.attributes"/>
     281    <xsl:call-template name="id.attribute"/>
    254282    <xsl:copy-of select="$content"/>
    255283    <xsl:call-template name="apply-annotations"/>
     
    271299    <xsl:when test="local-name(..) = 'title'                     and (local-name(../..) = 'figure'                          or local-name(../..) = 'example'                          or local-name(../..) = 'table'                          or local-name(../..) = 'formalpara')">
    272300      <code>
    273         <xsl:apply-templates select="." mode="class.attribute"/>
    274         <xsl:call-template name="generate.html.title"/>
    275         <xsl:call-template name="dir"/>
     301        <xsl:call-template name="common.html.attributes"/>
     302        <xsl:call-template name="id.attribute"/>
    276303        <xsl:copy-of select="$content"/>
    277304        <xsl:call-template name="apply-annotations"/>
     
    280307    <xsl:otherwise>
    281308      <strong>
    282         <xsl:apply-templates select="." mode="class.attribute"/>
     309        <xsl:call-template name="common.html.attributes"/>
     310        <xsl:call-template name="id.attribute"/>
    283311        <code>
    284312          <xsl:call-template name="generate.html.title"/>
     
    302330  </xsl:param>
    303331  <em>
    304     <xsl:apply-templates select="." mode="class.attribute"/>
     332    <xsl:call-template name="common.html.attributes"/>
     333    <xsl:call-template name="id.attribute"/>
    305334    <code>
    306335      <xsl:call-template name="generate.html.title"/>
     
    323352  <sup>
    324353    <xsl:call-template name="generate.html.title"/>
     354    <xsl:call-template name="id.attribute"/>
    325355    <xsl:call-template name="dir"/>
    326356    <xsl:copy-of select="$content"/>
     
    340370  <sub>
    341371    <xsl:call-template name="generate.html.title"/>
     372    <xsl:call-template name="id.attribute"/>
    342373    <xsl:call-template name="dir"/>
    343374    <xsl:copy-of select="$content"/>
     
    361392
    362393  <span>
    363     <xsl:apply-templates select="." mode="class.attribute"/>
     394    <xsl:call-template name="common.html.attributes"/>
     395    <xsl:call-template name="id.attribute"/>
    364396    <xsl:copy-of select="$content"/>
    365397  </span>
     
    378410
    379411  <span>
    380     <xsl:apply-templates select="." mode="class.attribute"/>
     412    <xsl:call-template name="common.html.attributes"/>
     413    <xsl:call-template name="id.attribute"/>
    381414    <xsl:copy-of select="$content"/>
    382415  </span>
     
    395428
    396429  <span>
    397     <xsl:apply-templates select="." mode="class.attribute"/>
     430    <xsl:call-template name="common.html.attributes"/>
     431    <xsl:call-template name="id.attribute"/>
    398432    <xsl:copy-of select="$content"/>
    399433  </span>
     
    504538<xsl:template match="function/parameter" priority="2">
    505539  <xsl:call-template name="inline.italicmonoseq"/>
    506   <xsl:if test="following-sibling::*">
     540  <xsl:if test="$function.parens != 0 and following-sibling::*">
    507541    <xsl:text>, </xsl:text>
    508542  </xsl:if>
     
    511545<xsl:template match="function/replaceable" priority="2">
    512546  <xsl:call-template name="inline.italicmonoseq"/>
    513   <xsl:if test="following-sibling::*">
     547  <xsl:if test="$function.parens != 0 and following-sibling::*">
    514548    <xsl:text>, </xsl:text>
    515549  </xsl:if>
     
    553587
    554588<xsl:template match="keycap">
    555   <xsl:call-template name="inline.boldseq"/>
     589  <xsl:choose>
     590    <xsl:when test="@function and normalize-space(.) = ''">
     591      <xsl:call-template name="inline.boldseq">
     592        <xsl:with-param name="content">
     593          <xsl:call-template name="gentext.template">
     594            <xsl:with-param name="context" select="'keycap'"/>
     595            <xsl:with-param name="name" select="@function"/>
     596          </xsl:call-template>
     597        </xsl:with-param>
     598      </xsl:call-template>
     599    </xsl:when>
     600    <xsl:otherwise>
     601      <xsl:call-template name="inline.boldseq"/>
     602    </xsl:otherwise>
     603  </xsl:choose>
    556604</xsl:template>
    557605
     
    656704    <xsl:when test="$citerefentry.link != '0'">
    657705      <a>
    658         <xsl:apply-templates select="." mode="class.attribute"/>
     706        <xsl:apply-templates select="." mode="common.html.attributes"/>
    659707        <xsl:attribute name="href">
    660708          <xsl:call-template name="generate.citerefentry.link"/>
     
    696744<xsl:template match="emphasis">
    697745  <span>
     746    <xsl:call-template name="id.attribute"/>
    698747    <xsl:choose>
    699       <xsl:when test="@role and $emphasis.propagates.style != 0">
    700         <xsl:apply-templates select="." mode="class.attribute">
     748      <!-- We don't want empty @class values, so do not propagate empty @roles -->
     749      <xsl:when test="@role  and                       normalize-space(@role) != '' and                       $emphasis.propagates.style != 0">
     750        <xsl:apply-templates select="." mode="common.html.attributes">
    701751          <xsl:with-param name="class" select="@role"/>
    702752        </xsl:apply-templates>
    703753      </xsl:when>
    704754      <xsl:otherwise>
    705         <xsl:apply-templates select="." mode="class.attribute"/>
     755        <xsl:apply-templates select="." mode="common.html.attributes"/>
    706756      </xsl:otherwise>
    707757    </xsl:choose>
     
    737787<xsl:template match="foreignphrase">
    738788  <span>
    739     <xsl:apply-templates select="." mode="class.attribute"/>
    740     <xsl:if test="@lang or @xml:lang">
    741       <xsl:call-template name="language.attribute"/>
    742     </xsl:if>
     789    <xsl:apply-templates select="." mode="common.html.attributes"/>
    743790    <xsl:call-template name="inline.italicseq"/>
    744791  </span>
     
    751798<xsl:template match="phrase">
    752799  <span>
    753     <xsl:call-template name="generate.html.title"/>
    754     <xsl:if test="@lang or @xml:lang">
    755       <xsl:call-template name="language.attribute"/>
    756     </xsl:if>
    757     <xsl:if test="@role and $phrase.propagates.style != 0">
    758       <xsl:apply-templates select="." mode="class.attribute">
    759         <xsl:with-param name="class" select="@role"/>
    760       </xsl:apply-templates>
    761     </xsl:if>
     800    <xsl:call-template name="id.attribute"/>
     801    <xsl:call-template name="locale.html.attributes"/>
     802    <!-- We don't want empty @class values, so do not propagate empty @roles -->
     803    <xsl:choose>
     804      <xsl:when test="@role and                       normalize-space(@role) != '' and                      $phrase.propagates.style != 0">
     805        <xsl:apply-templates select="." mode="class.attribute">
     806          <xsl:with-param name="class" select="@role"/>
     807        </xsl:apply-templates>
     808      </xsl:when>
     809      <xsl:otherwise>
     810        <xsl:apply-templates select="." mode="class.attribute"/>
     811      </xsl:otherwise>
     812    </xsl:choose>
    762813    <xsl:call-template name="dir"/>
    763814    <xsl:call-template name="anchor"/>
     
    779830    </xsl:call-template>
    780831  </xsl:variable>
    781   <xsl:choose>
    782     <xsl:when test="$depth mod 2 = 0">
    783       <xsl:call-template name="gentext.startquote"/>
    784       <xsl:call-template name="inline.charseq"/>
    785       <xsl:call-template name="gentext.endquote"/>
    786     </xsl:when>
    787     <xsl:otherwise>
    788       <xsl:call-template name="gentext.nestedstartquote"/>
    789       <xsl:call-template name="inline.charseq"/>
    790       <xsl:call-template name="gentext.nestedendquote"/>
    791     </xsl:otherwise>
    792   </xsl:choose>
     832  <span>
     833    <xsl:apply-templates select="." mode="common.html.attributes"/>
     834    <xsl:choose>
     835      <xsl:when test="$depth mod 2 = 0">
     836        <xsl:call-template name="gentext.startquote"/>
     837        <xsl:call-template name="inline.charseq"/>
     838        <xsl:call-template name="gentext.endquote"/>
     839      </xsl:when>
     840      <xsl:otherwise>
     841        <xsl:call-template name="gentext.nestedstartquote"/>
     842        <xsl:call-template name="inline.charseq"/>
     843        <xsl:call-template name="gentext.nestedendquote"/>
     844      </xsl:otherwise>
     845    </xsl:choose>
     846  </span>
    793847</xsl:template>
    794848
     
    803857<xsl:template match="lineannotation">
    804858  <em>
    805     <xsl:apply-templates select="." mode="class.attribute"/>
     859    <xsl:apply-templates select="." mode="common.html.attributes"/>
    806860    <xsl:call-template name="inline.charseq"/>
    807861  </em>
     
    861915        <xsl:when test="$target">
    862916          <a>
    863             <xsl:apply-templates select="." mode="class.attribute"/>
     917            <xsl:apply-templates select="." mode="common.html.attributes"/>
    864918            <xsl:if test="@id or @xml:id">
    865919              <xsl:attribute name="id">
     
    944998          </xsl:variable>
    945999          <a href="{$chunkbase}#{$id}">
    946             <xsl:apply-templates select="." mode="class.attribute"/>
     1000            <xsl:apply-templates select="." mode="common.html.attributes"/>
    9471001            <xsl:call-template name="inline.italicseq">
    9481002              <xsl:with-param name="content" select="$content"/>
     
    9641018        </xsl:choose>
    9651019      </xsl:variable>
    966       <xsl:variable name="targets" select="//glossentry[normalize-space(glossterm)=$term                               or normalize-space(glossterm/@baseform)=$term]"/>
     1020      <xsl:variable name="targets" select="key('glossentries', $term)"/>
    9671021      <xsl:variable name="target" select="$targets[1]"/>
    9681022
     
    9781032        <xsl:otherwise>
    9791033          <a>
    980             <xsl:apply-templates select="." mode="class.attribute"/>
     1034            <xsl:apply-templates select="." mode="common.html.attributes"/>
    9811035            <xsl:if test="@id or @xml:id">
    9821036              <xsl:attribute name="id">
     
    10071061<xsl:template match="termdef">
    10081062  <span>
    1009     <xsl:apply-templates select="." mode="class.attribute"/>
    1010     <xsl:call-template name="generate.html.title"/>
     1063    <xsl:apply-templates select="." mode="common.html.attributes"/>
    10111064    <xsl:call-template name="gentext.template">
    10121065      <xsl:with-param name="context" select="'termdef'"/>
     
    10981151
    10991152  <code>
    1100     <xsl:apply-templates select="." mode="class.attribute">
     1153    <xsl:apply-templates select="." mode="common.html.attributes">
    11011154      <xsl:with-param name="class" select="concat('sgmltag-', $class)"/>
    11021155    </xsl:apply-templates>
    1103     <xsl:call-template name="generate.html.title"/>
    11041156    <xsl:call-template name="simple.xlink">
    11051157      <xsl:with-param name="content" select="$content"/>
     
    11151167      </xsl:if>
    11161168      <a>
    1117         <xsl:apply-templates select="." mode="class.attribute"/>
     1169        <xsl:apply-templates select="." mode="common.html.attributes"/>
     1170        <xsl:call-template name="id.attribute"/>
    11181171        <xsl:attribute name="href">
    11191172          <xsl:text>mailto:</xsl:text>
     
    12151268      <xsl:text>[</xsl:text>
    12161269      <a>
    1217         <xsl:apply-templates select="." mode="class.attribute"/>
     1270        <xsl:apply-templates select="." mode="common.html.attributes"/>
    12181271        <xsl:attribute name="href">
    12191272          <xsl:call-template name="href.target">
     
    12221275        </xsl:attribute>
    12231276
    1224         <xsl:choose>
    1225           <xsl:when test="$bibliography.numbered != 0">
    1226             <xsl:apply-templates select="$target" mode="citation"/>
    1227           </xsl:when>
    1228           <xsl:otherwise>
    1229             <xsl:call-template name="inline.charseq"/>
    1230           </xsl:otherwise>
    1231         </xsl:choose>
     1277        <xsl:choose>
     1278          <xsl:when test="$bibliography.numbered != 0">
     1279            <xsl:call-template name="id.attribute"/>
     1280            <xsl:apply-templates select="$target" mode="citation"/>
     1281          </xsl:when>
     1282          <xsl:otherwise>
     1283            <xsl:call-template name="inline.charseq"/>
     1284          </xsl:otherwise>
     1285        </xsl:choose>
    12321286
    12331287      </a>
     
    12421296</xsl:template>
    12431297
     1298<xsl:template match="citebiblioid">
     1299  <xsl:variable name="targets" select="//*[biblioid = string(current())]"/>
     1300  <xsl:variable name="target" select="$targets[1]"/>
     1301
     1302  <xsl:choose>
     1303    <!-- try automatic linking based on match to parent of biblioid -->
     1304    <xsl:when test="$target and not(xref) and not(link)">
     1305
     1306      <xsl:text>[</xsl:text>
     1307      <a>
     1308        <xsl:apply-templates select="." mode="common.html.attributes"/>
     1309        <xsl:attribute name="href">
     1310          <xsl:call-template name="href.target">
     1311            <xsl:with-param name="object" select="$target"/>
     1312          </xsl:call-template>
     1313        </xsl:attribute>
     1314
     1315        <xsl:call-template name="inline.charseq"/>
     1316
     1317      </a>
     1318      <xsl:text>]</xsl:text>
     1319    </xsl:when>
     1320    <xsl:otherwise>
     1321      <xsl:text>[</xsl:text>
     1322      <xsl:call-template name="inline.charseq"/>
     1323      <xsl:text>]</xsl:text>
     1324    </xsl:otherwise>
     1325  </xsl:choose>
     1326</xsl:template>
     1327
    12441328<xsl:template match="biblioentry|bibliomixed" mode="citation">
    12451329  <xsl:number from="bibliography" count="biblioentry|bibliomixed" level="any" format="1"/>
     
    12481332<!-- ==================================================================== -->
    12491333
    1250 <xsl:template match="comment[parent::answer|parent::appendix|parent::article|parent::bibliodiv|parent::bibliography|parent::blockquote|parent::caution|parent::chapter|parent::glossary|parent::glossdiv|parent::important|parent::index|parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|parent::partintro|parent::preface|parent::procedure|parent::qandadiv|parent::qandaset|parent::question|parent::refentry|parent::refnamediv|parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|parent::sect5|parent::section|parent::setindex|parent::sidebar|parent::simplesect|parent::taskprerequisites|parent::taskrelated|parent::tasksummary|parent::warning]|remark[parent::answer|parent::appendix|parent::article|parent::bibliodiv|parent::bibliography|parent::blockquote|parent::caution|parent::chapter|parent::glossary|parent::glossdiv|parent::important|parent::index|parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|parent::partintro|parent::preface|parent::procedure|parent::qandadiv|parent::qandaset|parent::question|parent::refentry|parent::refnamediv|parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|parent::sect5|parent::section|parent::setindex|parent::sidebar|parent::simplesect|parent::taskprerequisites|parent::taskrelated|parent::tasksummary|parent::warning]">
     1334<xsl:template match="comment[parent::answer|parent::appendix|parent::article|parent::bibliodiv|                                 parent::bibliography|parent::blockquote|parent::caution|parent::chapter|                                 parent::glossary|parent::glossdiv|parent::important|parent::index|                                 parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|                                 parent::partintro|parent::preface|parent::procedure|parent::qandadiv|                                 parent::qandaset|parent::question|parent::refentry|parent::refnamediv|                                 parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|                                 parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|                                 parent::sect5|parent::section|parent::setindex|parent::sidebar|                                 parent::simplesect|parent::taskprerequisites|parent::taskrelated|                                 parent::tasksummary|parent::warning|parent::topic]|remark[parent::answer|parent::appendix|parent::article|parent::bibliodiv|                                 parent::bibliography|parent::blockquote|parent::caution|parent::chapter|                                 parent::glossary|parent::glossdiv|parent::important|parent::index|                                 parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|                                 parent::partintro|parent::preface|parent::procedure|parent::qandadiv|                                 parent::qandaset|parent::question|parent::refentry|parent::refnamediv|                                 parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|                                 parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|                                 parent::sect5|parent::section|parent::setindex|parent::sidebar|                                 parent::simplesect|parent::taskprerequisites|parent::taskrelated|                                 parent::tasksummary|parent::warning|parent::topic]">
    12511335  <xsl:if test="$show.comments != 0">
    1252     <p class="remark"><i><xsl:call-template name="inline.charseq"/></i></p>
     1336    <p class="remark"><em><xsl:call-template name="inline.charseq"/></em></p>
    12531337  </xsl:if>
    12541338</xsl:template>
     
    13041388
    13051389  <span>
    1306     <xsl:apply-templates select="." mode="class.attribute"/>
     1390    <xsl:apply-templates select="." mode="common.html.attributes"/>
     1391    <xsl:call-template name="id.attribute"/>
    13071392    <xsl:copy-of select="$content"/>
    13081393  </span>
     
    13211406
    13221407  <span>
    1323     <xsl:apply-templates select="." mode="class.attribute"/>
     1408    <xsl:apply-templates select="." mode="common.html.attributes"/>
     1409    <xsl:call-template name="id.attribute"/>
    13241410    <xsl:copy-of select="$content"/>
    13251411  </span>
     
    13401426
    13411427  <span>
    1342     <xsl:apply-templates select="." mode="class.attribute"/>
     1428    <xsl:apply-templates select="." mode="common.html.attributes"/>
     1429    <xsl:call-template name="id.attribute"/>
    13431430    <xsl:copy-of select="$content"/>
    13441431  </span>
     
    13571444
    13581445  <span>
    1359     <xsl:apply-templates select="." mode="class.attribute"/>
     1446    <xsl:apply-templates select="." mode="common.html.attributes"/>
     1447    <xsl:call-template name="id.attribute"/>
    13601448    <xsl:copy-of select="$content"/>
    13611449  </span>
     
    13741462
    13751463  <span>
    1376     <xsl:apply-templates select="." mode="class.attribute"/>
     1464    <xsl:apply-templates select="." mode="common.html.attributes"/>
    13771465    <xsl:copy-of select="$content"/>
    13781466  </span>
     
    13911479
    13921480  <span>
    1393     <xsl:apply-templates select="." mode="class.attribute"/>
     1481    <xsl:apply-templates select="." mode="common.html.attributes"/>
     1482    <xsl:call-template name="id.attribute"/>
    13941483    <xsl:copy-of select="$content"/>
    13951484  </span>
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/lists.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: lists.xsl 9307 2012-04-28 03:55:07Z bobstayton $
    88     ********************************************************************
    99
     
    1717
    1818<xsl:template match="itemizedlist">
     19  <!-- Handle spacing="compact" as multiple class attribute instead
     20       of the deprecated HTML compact attribute -->
     21  <xsl:variable name="default.class">
     22    <xsl:value-of select="local-name()"/>
     23    <xsl:if test="@spacing = 'compact'">
     24      <xsl:text> compact</xsl:text>
     25    </xsl:if>
     26  </xsl:variable>
     27 
     28  <xsl:variable name="style.value">
     29    <xsl:variable name="type">
     30      <xsl:call-template name="list.itemsymbol"/>
     31    </xsl:variable>
     32
     33    <xsl:text>list-style-type: </xsl:text>
     34    <xsl:value-of select="$type"/>
     35    <xsl:text>; </xsl:text>
     36  </xsl:variable>
     37
    1938  <div>
    20     <xsl:apply-templates select="." mode="class.attribute"/>
     39    <xsl:call-template name="common.html.attributes"/>
     40    <xsl:call-template name="id.attribute"/>
    2141    <xsl:call-template name="anchor"/>
    22     <xsl:if test="title">
     42    <xsl:if test="title|info/title">
    2343      <xsl:call-template name="formal.object.heading"/>
    2444    </xsl:if>
     
    2848
    2949    <ul>
    30       <xsl:if test="$css.decoration != 0">
    31         <xsl:attribute name="type">
    32           <xsl:call-template name="list.itemsymbol"/>
    33         </xsl:attribute>
    34       </xsl:if>
    35 
    36       <xsl:if test="@spacing='compact'">
    37         <xsl:attribute name="compact">
    38           <xsl:value-of select="@spacing"/>
    39         </xsl:attribute>
    40       </xsl:if>
     50      <xsl:call-template name="generate.class.attribute">
     51        <xsl:with-param name="class" select="$default.class"/>
     52      </xsl:call-template>
     53      <xsl:choose>
     54        <xsl:when test="$css.decoration != 0">
     55          <xsl:attribute name="style">
     56            <xsl:value-of select="$style.value"/>
     57          </xsl:attribute>
     58        </xsl:when>
     59        <xsl:when test="$make.clean.html != 0">
     60          <!-- styled by separate css only -->
     61        </xsl:when>
     62        <xsl:otherwise>
     63          <!-- use the old @type attribute -->
     64          <xsl:attribute name="type">
     65            <xsl:call-template name="list.itemsymbol"/>
     66          </xsl:attribute>
     67        </xsl:otherwise>
     68      </xsl:choose>
     69
    4170      <xsl:apply-templates select="listitem                     |comment()[preceding-sibling::listitem]                     |processing-instruction()[preceding-sibling::listitem]"/>
    4271    </ul>
     
    75104
    76105  <li>
     106    <xsl:call-template name="common.html.attributes"/>
     107    <xsl:call-template name="id.attribute"/>
    77108    <xsl:if test="$css.decoration = '1' and $cssmark != ''">
    78109      <xsl:attribute name="style">
     
    104135
    105136<xsl:template match="orderedlist">
     137  <!-- Handle spacing="compact" as multiple class attribute instead
     138       of the deprecated HTML compact attribute -->
     139  <xsl:variable name="default.class">
     140    <xsl:value-of select="local-name()"/>
     141    <xsl:if test="@spacing = 'compact'">
     142      <xsl:text> compact</xsl:text>
     143    </xsl:if>
     144  </xsl:variable>
     145 
    106146  <xsl:variable name="start">
    107147    <xsl:call-template name="orderedlist-starting-number"/>
     
    131171
    132172  <div>
    133     <xsl:apply-templates select="." mode="class.attribute"/>
     173    <xsl:call-template name="common.html.attributes"/>
     174    <xsl:call-template name="id.attribute"/>
    134175    <xsl:call-template name="anchor"/>
    135176
    136     <xsl:if test="title">
     177    <xsl:if test="title|info/title">
    137178      <xsl:call-template name="formal.object.heading"/>
    138179    </xsl:if>
     
    141182    <xsl:apply-templates select="*[not(self::listitem                   or self::title                   or self::titleabbrev)]                 |comment()[not(preceding-sibling::listitem)]                 |processing-instruction()[not(preceding-sibling::listitem)]"/>
    142183
    143     <ol>
    144       <xsl:if test="$start != '1'">
    145         <xsl:attribute name="start">
    146           <xsl:value-of select="$start"/>
    147         </xsl:attribute>
    148       </xsl:if>
    149       <xsl:if test="$numeration != ''">
    150         <xsl:attribute name="type">
    151           <xsl:value-of select="$type"/>
    152         </xsl:attribute>
    153       </xsl:if>
    154       <xsl:if test="@spacing='compact'">
    155         <xsl:attribute name="compact">
    156           <xsl:value-of select="@spacing"/>
    157         </xsl:attribute>
    158       </xsl:if>
    159       <xsl:apply-templates select="listitem                     |comment()[preceding-sibling::listitem]                     |processing-instruction()[preceding-sibling::listitem]"/>
    160     </ol>
     184    <xsl:choose>
     185      <xsl:when test="@inheritnum='inherit' and ancestor::listitem[parent::orderedlist]">
     186        <table border="{$table.border.off}">
     187          <xsl:call-template name="generate.class.attribute">
     188            <xsl:with-param name="class" select="$default.class"/>
     189          </xsl:call-template>
     190          <colgroup>
     191            <col align="{$direction.align.start}" valign="top"/>
     192            <col/>
     193          </colgroup>
     194          <tbody>
     195            <xsl:apply-templates mode="orderedlist-table" select="listitem                         |comment()[preceding-sibling::listitem]                         |processing-instruction()[preceding-sibling::listitem]"/>
     196          </tbody>
     197        </table>
     198      </xsl:when>
     199      <xsl:otherwise>
     200        <ol>
     201          <xsl:call-template name="generate.class.attribute">
     202            <xsl:with-param name="class" select="$default.class"/>
     203          </xsl:call-template>
     204          <xsl:if test="$start != '1'">
     205            <xsl:attribute name="start">
     206              <xsl:value-of select="$start"/>
     207            </xsl:attribute>
     208          </xsl:if>
     209          <xsl:if test="$numeration != ''">
     210            <xsl:attribute name="type">
     211              <xsl:value-of select="$type"/>
     212            </xsl:attribute>
     213          </xsl:if>
     214          <xsl:apply-templates select="listitem                         |comment()[preceding-sibling::listitem]                         |processing-instruction()[preceding-sibling::listitem]"/>
     215        </ol>
     216      </xsl:otherwise>
     217    </xsl:choose>
    161218  </div>
    162219</xsl:template>
     
    168225<xsl:template match="orderedlist/listitem">
    169226  <li>
     227    <xsl:call-template name="common.html.attributes"/>
     228    <xsl:call-template name="id.attribute"/>
    170229    <xsl:if test="@override">
    171230      <xsl:attribute name="value">
     
    195254</xsl:template>
    196255
     256<xsl:template match="orderedlist/listitem" mode="orderedlist-table">
     257  <tr>
     258    <td>
     259      <xsl:apply-templates select="." mode="item-number"/>
     260    </td>
     261    <td>
     262      <xsl:if test="local-name(child::*[1]) != 'para'">
     263        <xsl:call-template name="id.attribute"/>
     264        <xsl:call-template name="anchor"/>
     265      </xsl:if>
     266
     267      <xsl:choose>
     268        <xsl:when test="$show.revisionflag != 0 and @revisionflag">
     269          <div class="{@revisionflag}">
     270            <xsl:apply-templates/>
     271          </div>
     272        </xsl:when>
     273        <xsl:otherwise>
     274          <xsl:apply-templates/>
     275        </xsl:otherwise>
     276      </xsl:choose>
     277    </td>
     278  </tr>
     279</xsl:template>
     280
    197281<xsl:template match="variablelist">
    198282  <xsl:variable name="pi-presentation">
    199283    <xsl:call-template name="pi.dbhtml_list-presentation"/>
    200284  </xsl:variable>
     285  <!-- Handle spacing="compact" as multiple class attribute instead
     286       of the deprecated HTML compact attribute -->
     287  <xsl:variable name="default.class">
     288    <xsl:value-of select="local-name()"/>
     289    <xsl:if test="@spacing = 'compact'">
     290      <xsl:text> compact</xsl:text>
     291    </xsl:if>
     292  </xsl:variable>
     293 
    201294
    202295  <xsl:variable name="presentation">
     
    227320
    228321  <div>
    229     <xsl:apply-templates select="." mode="class.attribute"/>
     322    <xsl:call-template name="common.html.attributes"/>
     323    <xsl:call-template name="id.attribute"/>
    230324    <xsl:call-template name="anchor"/>
    231     <xsl:if test="title">
     325    <xsl:if test="title|info/title">
    232326      <xsl:call-template name="formal.object.heading"/>
    233327    </xsl:if>
     
    237331        <!-- Preserve order of PIs and comments -->
    238332        <xsl:apply-templates select="*[not(self::varlistentry                     or self::title                     or self::titleabbrev)]                   |comment()[not(preceding-sibling::varlistentry)]                   |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
    239         <table border="0">
     333        <table border="{$table.border.off}">
     334          <xsl:call-template name="generate.class.attribute">
     335            <xsl:with-param name="class" select="$default.class"/>
     336          </xsl:call-template>
    240337          <xsl:if test="$list-width != ''">
    241338            <xsl:attribute name="width">
     
    248345            </xsl:attribute>
    249346          </xsl:if>
    250           <col align="left" valign="top">
    251             <xsl:if test="$term-width != ''">
    252               <xsl:attribute name="width">
    253                 <xsl:value-of select="$term-width"/>
    254               </xsl:attribute>
    255             </xsl:if>
    256           </col>
     347          <colgroup>
     348            <col align="{$direction.align.start}" valign="top">
     349              <xsl:if test="$term-width != ''">
     350                <xsl:attribute name="width">
     351                  <xsl:value-of select="$term-width"/>
     352                </xsl:attribute>
     353              </xsl:if>
     354            </col>
     355            <col/>
     356          </colgroup>
    257357          <tbody>
    258358            <xsl:apply-templates mode="varlist-table" select="varlistentry                       |comment()[preceding-sibling::varlistentry]                       |processing-instruction()[preceding-sibling::varlistentry]"/>
     
    264364        <xsl:apply-templates select="*[not(self::varlistentry                     or self::title                     or self::titleabbrev)]                   |comment()[not(preceding-sibling::varlistentry)]                   |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
    265365        <dl>
     366          <xsl:call-template name="generate.class.attribute">
     367            <xsl:with-param name="class" select="$default.class"/>
     368          </xsl:call-template>
    266369          <xsl:apply-templates select="varlistentry                       |comment()[preceding-sibling::varlistentry]                       |processing-instruction()[preceding-sibling::varlistentry]"/>
    267370        </dl>
     
    298401    <xsl:otherwise>
    299402      <p>
    300         <xsl:if test="@role and $para.propagates.style != 0">
    301            <xsl:apply-templates select="." mode="class.attribute">
    302              <xsl:with-param name="class" select="@role"/>
    303            </xsl:apply-templates>
    304         </xsl:if>
     403        <xsl:call-template name="id.attribute"/>
     404        <xsl:choose>
     405          <xsl:when test="@role and $para.propagates.style != 0">
     406            <xsl:call-template name="common.html.attributes">
     407              <xsl:with-param name="class" select="@role"/>
     408            </xsl:call-template>
     409          </xsl:when>
     410          <xsl:otherwise>
     411            <xsl:call-template name="common.html.attributes"/>
     412          </xsl:otherwise>
     413        </xsl:choose>
    305414
    306415        <xsl:call-template name="anchor"/>
     
    313422<xsl:template match="varlistentry">
    314423  <dt>
     424    <xsl:call-template name="id.attribute"/>
    315425    <xsl:call-template name="anchor"/>
    316426    <xsl:apply-templates select="term"/>
     
    341451
    342452    <td>
     453      <xsl:call-template name="id.attribute"/>
    343454      <p>
    344455      <xsl:call-template name="anchor"/>
    345456      <xsl:choose>
    346457        <xsl:when test="$presentation = 'bold'">
    347           <b>
     458          <strong>
    348459            <xsl:apply-templates select="term"/>
    349460            <xsl:value-of select="$separator"/>
    350           </b>
     461          </strong>
    351462        </xsl:when>
    352463        <xsl:when test="$presentation = 'italic'">
    353           <i>
     464          <em>
    354465            <xsl:apply-templates select="term"/>
    355466            <xsl:value-of select="$separator"/>
    356           </i>
     467          </em>
    357468        </xsl:when>
    358469        <xsl:when test="$presentation = 'bold-italic'">
    359           <b>
    360             <i>
     470          <strong>
     471            <em>
    361472              <xsl:apply-templates select="term"/>
    362473              <xsl:value-of select="$separator"/>
    363             </i>
    364           </b>
     474            </em>
     475          </strong>
    365476        </xsl:when>
    366477        <xsl:otherwise>
     
    378489
    379490<xsl:template match="varlistentry/term">
    380   <span class="term">
     491  <span>
     492    <xsl:call-template name="common.html.attributes"/>
     493    <xsl:call-template name="id.attribute"/>
    381494    <xsl:call-template name="anchor"/>
    382495    <xsl:call-template name="simple.xlink">
     
    426539  <!-- with no type specified, the default is 'vert' -->
    427540  <xsl:call-template name="anchor"/>
    428   <table class="simplelist" border="0" summary="Simple list">
     541  <table border="{$table.border.off}">
     542    <xsl:if test="$div.element != 'section'">
     543      <xsl:attribute name="summary">Simple list</xsl:attribute>
     544    </xsl:if>
     545    <xsl:call-template name="common.html.attributes"/>
     546    <xsl:call-template name="id.attribute"/>
    429547    <xsl:call-template name="simplelist.vert">
    430548      <xsl:with-param name="cols">
     
    442560<xsl:template match="simplelist[@type='inline']">
    443561  <span>
    444     <xsl:apply-templates select="." mode="class.attribute"/>
    445   <!-- if dbchoice PI exists, use that to determine the choice separator -->
    446   <!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
    447   <!-- value of "choice" otherwise -->
    448   <xsl:variable name="localized-choice-separator">
    449     <xsl:choose>
    450       <xsl:when test="processing-instruction('dbchoice')">
    451         <xsl:call-template name="select.choice.separator"/>
    452       </xsl:when>
    453       <xsl:otherwise>
    454         <!-- empty -->
    455       </xsl:otherwise>
    456     </xsl:choose>
    457   </xsl:variable>
    458 
    459   <xsl:for-each select="member">
    460     <xsl:call-template name="simple.xlink">
    461       <xsl:with-param name="content">
    462         <xsl:apply-templates/>
    463       </xsl:with-param>
    464     </xsl:call-template>
    465     <xsl:choose>
    466       <xsl:when test="position() = last()"/> <!-- do nothing -->
    467       <xsl:otherwise>
    468         <xsl:text>, </xsl:text>
    469         <xsl:if test="position() = last() - 1">
    470           <xsl:if test="$localized-choice-separator != ''">
    471             <xsl:value-of select="$localized-choice-separator"/>
    472             <xsl:text> </xsl:text>
    473           </xsl:if>
    474         </xsl:if>
    475       </xsl:otherwise>
    476     </xsl:choose>
    477   </xsl:for-each>
     562    <xsl:call-template name="common.html.attributes"/>
     563    <xsl:call-template name="id.attribute"/>
     564    <!-- if dbchoice PI exists, use that to determine the choice separator -->
     565    <!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
     566    <!-- value of "choice" otherwise -->
     567    <xsl:variable name="localized-choice-separator">
     568      <xsl:choose>
     569        <xsl:when test="processing-instruction('dbchoice')">
     570          <xsl:call-template name="select.choice.separator"/>
     571        </xsl:when>
     572        <xsl:otherwise>
     573          <!-- empty -->
     574        </xsl:otherwise>
     575      </xsl:choose>
     576    </xsl:variable>
     577 
     578    <xsl:for-each select="member">
     579      <xsl:call-template name="simple.xlink">
     580        <xsl:with-param name="content">
     581          <xsl:apply-templates/>
     582        </xsl:with-param>
     583      </xsl:call-template>
     584      <xsl:choose>
     585        <xsl:when test="position() = last()"/> <!-- do nothing -->
     586        <xsl:otherwise>
     587          <xsl:text>, </xsl:text>
     588          <xsl:if test="position() = last() - 1">
     589            <xsl:if test="$localized-choice-separator != ''">
     590              <xsl:value-of select="$localized-choice-separator"/>
     591              <xsl:text> </xsl:text>
     592            </xsl:if>
     593          </xsl:if>
     594        </xsl:otherwise>
     595      </xsl:choose>
     596    </xsl:for-each>
    478597  </span>
    479598</xsl:template>
     
    481600<xsl:template match="simplelist[@type='horiz']">
    482601  <xsl:call-template name="anchor"/>
    483   <table class="simplelist" border="0" summary="Simple list">
     602  <table border="{$table.border.off}">
     603    <xsl:if test="$div.element != 'section'">
     604      <xsl:attribute name="summary">Simple list</xsl:attribute>
     605    </xsl:if>
     606    <xsl:call-template name="common.html.attributes"/>
     607    <xsl:call-template name="id.attribute"/>
    484608    <xsl:call-template name="simplelist.horiz">
    485609      <xsl:with-param name="cols">
     
    497621<xsl:template match="simplelist[@type='vert']">
    498622  <xsl:call-template name="anchor"/>
    499   <table class="simplelist" border="0" summary="Simple list">
     623  <table border="{$table.border.off}">
     624    <xsl:if test="$div.element != 'section'">
     625      <xsl:attribute name="summary">Simple list</xsl:attribute>
     626    </xsl:if>
     627    <xsl:call-template name="common.html.attributes"/>
     628    <xsl:call-template name="id.attribute"/>
    500629    <xsl:call-template name="simplelist.vert">
    501630      <xsl:with-param name="cols">
     
    650779
    651780  <div>
    652     <xsl:apply-templates select="." mode="class.attribute"/>
     781    <xsl:call-template name="common.html.attributes"/>
     782    <xsl:call-template name="id.attribute">
     783      <xsl:with-param name="conditional">
     784        <xsl:choose>
     785          <xsl:when test="title">0</xsl:when>
     786          <xsl:otherwise>1</xsl:otherwise>
     787        </xsl:choose>
     788      </xsl:with-param>
     789    </xsl:call-template>
    653790    <xsl:call-template name="anchor">
    654791      <xsl:with-param name="conditional">
    655792        <xsl:choose>
    656           <xsl:when test="title">0</xsl:when>
    657           <xsl:otherwise>1</xsl:otherwise>
    658         </xsl:choose>
     793          <xsl:when test="title">0</xsl:when>
     794          <xsl:otherwise>1</xsl:otherwise>
     795        </xsl:choose>
    659796      </xsl:with-param>
    660797    </xsl:call-template>
    661798
    662     <xsl:if test="title and $placement = 'before'">
     799    <xsl:if test="(title or info/title) and $placement = 'before'">
    663800      <xsl:call-template name="formal.object.heading"/>
    664801    </xsl:if>
     
    669806      <xsl:when test="count(step) = 1">
    670807        <ul>
     808          <xsl:call-template name="generate.class.attribute"/>
    671809          <xsl:apply-templates select="step                     |comment()[preceding-sibling::step]                     |processing-instruction()[preceding-sibling::step]"/>
    672810        </ul>
     
    674812      <xsl:otherwise>
    675813        <ol>
     814          <xsl:call-template name="generate.class.attribute"/>
    676815          <xsl:attribute name="type">
    677816            <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
     
    682821    </xsl:choose>
    683822
    684     <xsl:if test="title and $placement != 'before'">
     823    <xsl:if test="(title or info/title) and $placement != 'before'">
    685824      <xsl:call-template name="formal.object.heading"/>
    686825    </xsl:if>
     
    700839
    701840  <ol type="{$numeration}">
     841    <xsl:call-template name="common.html.attributes"/>
     842    <xsl:call-template name="id.attribute"/>
    702843    <xsl:apply-templates/>
    703844  </ol>
     
    706847<xsl:template match="step">
    707848  <li>
     849    <xsl:call-template name="common.html.attributes"/>
     850    <xsl:call-template name="id.attribute"/>
    708851    <xsl:call-template name="anchor"/>
    709852    <xsl:apply-templates/>
     
    714857  <xsl:call-template name="anchor"/>
    715858  <ul>
     859    <xsl:call-template name="common.html.attributes"/>
     860    <xsl:call-template name="id.attribute"/>
    716861    <xsl:apply-templates/>
    717862  </ul>
     
    719864
    720865<xsl:template match="step/title">
    721   <p class="title">
    722     <b>
     866  <p>
     867    <xsl:call-template name="common.html.attributes"/>
     868    <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
    723869      <xsl:apply-templates/>
    724     </b>
     870    </strong>
    725871  </p>
    726872</xsl:template>
     
    734880
    735881  <div>
    736     <xsl:apply-templates select="." mode="class.attribute"/>
     882    <xsl:call-template name="common.html.attributes"/>
     883    <xsl:call-template name="id.attribute"/>
    737884    <xsl:call-template name="anchor"/>
    738885
     
    755902
    756903<xsl:template match="segmentedlist/title">
    757   <div class="title">
    758     <strong><span class="title"><xsl:apply-templates/></span></strong>
     904  <div>
     905    <xsl:call-template name="common.html.attributes"/>
     906    <strong>
     907      <span>
     908        <xsl:call-template name="generate.class.attribute"/>
     909        <xsl:apply-templates/>
     910      </span>
     911    </strong>
    759912  </div>
    760913</xsl:template>
     
    768921
    769922<xsl:template match="seglistitem">
    770   <div class="seglistitem">
     923  <div>
     924    <xsl:call-template name="common.html.attributes"/>
     925    <xsl:call-template name="id.attribute"/>
    771926    <xsl:call-template name="anchor"/>
    772927    <xsl:apply-templates/>
     
    785940  -->
    786941
    787   <div class="seg">
     942  <div>
     943    <xsl:call-template name="common.html.attributes"/>
     944    <xsl:call-template name="id.attribute"/>
    788945    <strong>
    789946      <span class="segtitle">
     
    807964  <xsl:apply-templates select="title"/>
    808965
    809   <table border="0">
     966  <table border="{$table.border.off}">
    810967    <xsl:if test="$list-width != ''">
    811968      <xsl:attribute name="width">
     
    813970      </xsl:attribute>
    814971    </xsl:if>
    815     <xsl:if test="$table-summary != ''">
     972    <xsl:if test="$table-summary != '' and $div.element != 'section'">
    816973      <xsl:attribute name="summary">
    817974        <xsl:value-of select="$table-summary"/>
     
    842999  </xsl:variable>
    8431000
    844   <tr class="seglistitem">
     1001  <tr>
     1002    <xsl:call-template name="common.html.attributes"/>
     1003    <xsl:call-template name="id.attribute"/>
    8451004    <xsl:call-template name="tr.attributes">
    8461005      <xsl:with-param name="rownum" select="$seglinum + 1"/>
     
    8511010
    8521011<xsl:template match="seg" mode="seglist-table">
    853   <td class="seg"><xsl:apply-templates/></td>
     1012  <td>
     1013    <xsl:call-template name="common.html.attributes"/>
     1014    <xsl:call-template name="id.attribute"/>
     1015    <xsl:apply-templates/>
     1016  </td>
    8541017</xsl:template>
    8551018
    8561019<xsl:template match="seg[1]" mode="seglist-table">
    857   <td class="seg">
     1020  <td>
     1021    <xsl:call-template name="common.html.attributes"/>
     1022    <xsl:call-template name="id.attribute"/>
    8581023    <xsl:call-template name="anchor">
    8591024      <xsl:with-param name="node" select="ancestor::seglistitem"/>
     
    8671032<xsl:template match="calloutlist">
    8681033  <div>
    869     <xsl:apply-templates select="." mode="class.attribute"/>
     1034    <xsl:call-template name="common.html.attributes"/>
     1035    <xsl:call-template name="id.attribute"/>
    8701036    <xsl:call-template name="anchor"/>
    8711037    <xsl:if test="title|info/title">
     
    8741040
    8751041    <!-- Preserve order of PIs and comments -->
    876     <xsl:apply-templates select="*[not(self::callout or self::title or self::titleabbrev)]                    |comment()[not(preceding-sibling::callout)]      |processing-instruction()[not(preceding-sibling::callout)]"/>
     1042    <xsl:apply-templates select="*[not(self::callout or self::title or self::titleabbrev)]                    |comment()[not(preceding-sibling::callout)]                    |processing-instruction()[not(preceding-sibling::callout)]"/>
    8771043
    8781044    <xsl:choose>
    8791045      <xsl:when test="$callout.list.table != 0">
    880         <table border="0" summary="Callout list">
    881           <xsl:apply-templates select="callout            |comment()[preceding-sibling::callout]     |processing-instruction()[preceding-sibling::callout]"/>
    882         </table>
    883       </xsl:when>
    884       <xsl:otherwise>
    885         <dl compact="compact">
    886           <xsl:apply-templates select="callout            |comment()[preceding-sibling::callout]     |processing-instruction()[preceding-sibling::callout]"/>
    887         </dl>
     1046        <table border="{$table.border.off}">
     1047          <xsl:if test="$div.element != 'section'">
     1048            <xsl:attribute name="summary">Callout list</xsl:attribute>
     1049          </xsl:if>
     1050          <xsl:apply-templates select="callout                                 |comment()[preceding-sibling::callout]                                 |processing-instruction()[preceding-sibling::callout]"/>
     1051        </table>
     1052      </xsl:when>
     1053      <xsl:otherwise>
     1054        <dl>
     1055          <xsl:apply-templates select="." mode="class.attribute"/>
     1056          <xsl:apply-templates select="callout                                 |comment()[preceding-sibling::callout]                                 |processing-instruction()[preceding-sibling::callout]"/>
     1057        </dl>
    8881058      </xsl:otherwise>
    8891059    </xsl:choose>
     
    9041074        </xsl:call-template>
    9051075
    906         <td width="5%" valign="top" align="left">
     1076        <td width="5%" valign="top" align="{$direction.align.start}">
     1077          <xsl:call-template name="id.attribute"/>
    9071078          <p>
    9081079            <xsl:call-template name="anchor"/>
     
    9121083          </p>
    9131084        </td>
    914         <td valign="top" align="left">
     1085        <td valign="top" align="{$direction.align.start}">
    9151086          <xsl:apply-templates/>
    9161087        </td>
     
    9191090    <xsl:otherwise>
    9201091      <dt>
     1092        <xsl:call-template name="id.attribute"/>
    9211093        <xsl:call-template name="anchor"/>
    9221094        <xsl:call-template name="callout.arearefs">
     
    9401112    <xsl:otherwise>
    9411113      <p>
     1114        <xsl:call-template name="id.attribute"/>
    9421115        <xsl:if test="@role and $para.propagates.style != 0">
    943           <xsl:apply-templates select="." mode="class.attribute">
    944             <xsl:with-param name="class" select="@role"/>
    945           </xsl:apply-templates>
     1116          <xsl:choose>
     1117            <xsl:when test="@role and $para.propagates.style != 0">
     1118              <xsl:call-template name="common.html.attributes">
     1119                <xsl:with-param name="class" select="@role"/>
     1120              </xsl:call-template>
     1121            </xsl:when>
     1122            <xsl:otherwise>
     1123              <xsl:call-template name="common.html.attributes"/>
     1124            </xsl:otherwise>
     1125          </xsl:choose>
    9461126        </xsl:if>
    9471127
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/maketoc.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: maketoc.xsl 6910 2007-06-28 23:23:30Z xmldoc $
    88     ********************************************************************
    99
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/onechunk.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: onechunk.xsl 6910 2007-06-28 23:23:30Z xmldoc $
    88     ********************************************************************
    99
     
    1616<!-- ==================================================================== -->
    1717
    18 <xsl:import href="profile-chunk.xsl"/>
     18<xsl:import href="chunk.xsl"/>
    1919
    2020<!-- Ok, using the onechunk parameter makes this all work again. -->
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/param.xsl

    rf2a5108 rb1a51ac1  
    66
    77<!-- ********************************************************************
    8      $Id$
     8     $Id: param.xweb 9658 2012-10-29 22:28:34Z bobstayton $
    99     ********************************************************************
    1010
     
    1515     ******************************************************************** -->
    1616
     17<xsl:param name="abstract.notitle.enabled" select="0"/>
     18<xsl:param name="activate.external.olinks" select="1"/>
    1719<xsl:param name="admon.graphics.extension">.png</xsl:param>
    1820<xsl:param name="admon.graphics" select="0"/>
    1921<xsl:param name="admon.graphics.path">images/</xsl:param>
    2022<xsl:param name="admon.style">
    21   <xsl:text>margin-left: 0.5in; margin-right: 0.5in;</xsl:text>
     23  <xsl:value-of select="concat('margin-', $direction.align.start,            ': 0.5in; margin-', $direction.align.end, ': 0.5in;')"/>
    2224</xsl:param>
    2325<xsl:param name="admon.textlabel" select="1"/>
     
    6668                     }
    6769</xsl:param>
     70<xsl:param name="annotation.graphic.close">
     71http://docbook.sourceforge.net/release/images/annot-close.png</xsl:param>
     72<xsl:param name="annotation.graphic.open">http://docbook.sourceforge.net/release/images/annot-open.png</xsl:param>
    6873
    6974<xsl:param name="annotation.js">
    7075<xsl:text>http://docbook.sourceforge.net/release/script/AnchorPosition.js http://docbook.sourceforge.net/release/script/PopupWindow.js</xsl:text></xsl:param>
    7176
    72 <xsl:param name="annotation.graphic.open">http://docbook.sourceforge.net/release/images/annot-open.png</xsl:param>
    73 <xsl:param name="annotation.graphic.close">
    74 http://docbook.sourceforge.net/release/images/annot-close.png</xsl:param>
    7577<xsl:param name="annotation.support" select="0"/>
    7678<xsl:param name="appendix.autolabel">A</xsl:param>
    7779<xsl:param name="author.othername.in.middle" select="1"/>
     80<xsl:param name="autotoc.label.in.hyperlink" select="1"/>
    7881<xsl:param name="autotoc.label.separator">. </xsl:param>
    79 <xsl:param name="autotoc.label.in.hyperlink" select="1"/>
    8082<xsl:param name="base.dir"/>
    8183<xsl:param name="biblioentry.item.separator">. </xsl:param>
     
    103105<xsl:param name="chunk.quietly" select="0"/>
    104106<xsl:param name="chunk.section.depth" select="1"/>
     107<xsl:param name="chunk.separate.lots" select="0"/>
    105108<xsl:param name="chunk.toc"/>
    106109<xsl:param name="chunk.tocs.and.lots" select="0"/>
    107110<xsl:param name="chunk.tocs.and.lots.has.title" select="1"/>
    108 <xsl:param name="chunk.separate.lots" select="0"/>
     111<xsl:param name="chunked.filename.prefix"/>
    109112<xsl:param name="citerefentry.link" select="0"/>
    110113<xsl:param name="collect.xref.targets">no</xsl:param>
     
    113116<xsl:param name="css.decoration" select="1"/>
    114117<xsl:param name="current.docid"/>
     118<xsl:param name="custom.css.source"/>
    115119<xsl:param name="default.float.class">
    116120  <xsl:choose>
     
    120124</xsl:param>
    121125<xsl:param name="default.image.width"/>
     126<xsl:param name="default.table.frame">all</xsl:param>
    122127<xsl:param name="default.table.width"/>
    123 <xsl:param name="default.table.frame">all</xsl:param>
    124 <xsl:param name="draft.mode">maybe</xsl:param>
    125 <xsl:param name="draft.watermark.image">http://docbook.sourceforge.net/release/images/draft.png</xsl:param>
     128<xsl:param name="docbook.css.link" select="1"/>
     129<xsl:param name="docbook.css.source">docbook.css.xml</xsl:param>
     130<xsl:param name="draft.mode">no</xsl:param>
     131<xsl:param name="draft.watermark.image">images/draft.png</xsl:param>
     132<xsl:param name="ebnf.assignment">
     133<code>::=</code>
     134</xsl:param>
     135
     136<xsl:param name="ebnf.statement.terminator"/>
     137
    126138<xsl:param name="ebnf.table.bgcolor">#F5DCB3</xsl:param>
    127139<xsl:param name="ebnf.table.border" select="1"/>
    128 <xsl:param name="ebnf.assignment">
    129 <code>::=</code>
    130 </xsl:param>
    131 
    132 <xsl:param name="ebnf.statement.terminator"/>
    133 
    134140<xsl:param name="eclipse.autolabel" select="0"/>
     141<xsl:param name="eclipse.plugin.id">com.example.help</xsl:param>
    135142<xsl:param name="eclipse.plugin.name">DocBook Online Help Sample</xsl:param>
    136 <xsl:param name="eclipse.plugin.id">com.example.help</xsl:param>
    137143<xsl:param name="eclipse.plugin.provider">Example provider</xsl:param>
    138144<xsl:param name="editedby.enabled">1</xsl:param>
     
    140146<xsl:param name="emphasis.propagates.style" select="1"/>
    141147<xsl:param name="entry.propagates.style" select="1"/>
     148<xsl:param name="exsl.node.set.available">
     149  <xsl:choose>
     150    <xsl:when xmlns:exsl="http://exslt.org/common" exsl:foo="" test="function-available('exsl:node-set') or                        contains(system-property('xsl:vendor'),                          'Apache Software Foundation')">1</xsl:when>
     151    <xsl:otherwise>0</xsl:otherwise>
     152  </xsl:choose>
     153</xsl:param>
    142154<xsl:param name="firstterm.only.link" select="0"/>
    143155<xsl:param name="footer.rule" select="1"/>
     
    155167<xsl:param name="funcsynopsis.decoration" select="1"/>
    156168<xsl:param name="funcsynopsis.style">kr</xsl:param>
    157 <xsl:param name="funcsynopsis.tabular.threshold">40</xsl:param>
    158169<xsl:param name="function.parens" select="0"/>
     170<xsl:param name="generate.consistent.ids" select="0"/>
     171<xsl:param name="generate.css.header" select="0"/>
    159172<xsl:param name="generate.id.attributes" select="0"/>
    160173<xsl:param name="generate.index" select="1"/>
    161174<xsl:param name="generate.legalnotice.link" select="0"/>
    162 <xsl:param name="generate.revhistory.link" select="0"/>
    163175<xsl:param name="generate.manifest" select="0"/>
    164176<xsl:param name="generate.meta.abstract" select="1"/>
     177<xsl:param name="generate.revhistory.link" select="0"/>
    165178<xsl:param name="generate.section.toc.level" select="0"/>
    166179<xsl:param name="generate.toc">
     
    194207<xsl:param name="highlight.default.language"/>
    195208<xsl:param name="highlight.source" select="0"/>
     209<xsl:param name="highlight.xslthl.config"/>
    196210<xsl:param name="html.append"/>
    197211<xsl:param name="html.base"/>
     
    201215<xsl:param name="html.ext">.html</xsl:param>
    202216<xsl:param name="html.extra.head.links" select="0"/>
     217<xsl:param name="html.head.legalnotice.link.multiple" select="1"/>
    203218<xsl:param name="html.head.legalnotice.link.types">copyright</xsl:param>
    204 <xsl:param name="html.head.legalnotice.link.multiple" select="1"/>
    205219<xsl:param name="html.longdesc" select="1"/>
    206220<xsl:param name="html.longdesc.link" select="$html.longdesc"/>
     221<xsl:param name="html.script"/>
     222<xsl:param name="html.script.type">text/javascript</xsl:param>
    207223<xsl:param name="html.stylesheet"/>
    208224<xsl:param name="html.stylesheet.type">text/css</xsl:param>
     
    256272<xsl:param name="htmlhelp.use.hhk" select="0"/>
    257273<xsl:param name="htmlhelp.window.geometry"/>
     274<xsl:param name="id.warnings" select="0"/>
     275<xsl:param name="ignore.image.scaling" select="0"/>
    258276<xsl:param name="img.src.path"/>
    259 <xsl:param name="id.warnings" select="0"/>
     277<xsl:param name="index.links.to.section" select="1"/>
    260278<xsl:param name="index.method">basic</xsl:param>
     279<xsl:param name="index.number.separator"/>
    261280<xsl:param name="index.on.role" select="0"/>
    262281<xsl:param name="index.on.type" select="0"/>
    263 <xsl:param name="index.number.separator"/>
     282<xsl:param name="index.prefer.titleabbrev" select="0"/>
     283<xsl:param name="index.range.separator"/>
    264284<xsl:param name="index.term.separator"/>
    265 <xsl:param name="index.range.separator"/>
    266 <xsl:param name="index.prefer.titleabbrev" select="0"/>
    267 <xsl:param name="ignore.image.scaling" select="0"/>
    268285<xsl:param name="inherit.keywords" select="1"/>
     286<xsl:param name="insert.olink.page.number">no</xsl:param>
     287<xsl:param name="insert.olink.pdf.frag" select="0"/>
    269288<xsl:param name="insert.xref.page.number">no</xsl:param>
    270289<xsl:param name="javahelp.encoding">iso-8859-1</xsl:param>
     
    281300<xsl:param name="linenumbering.width">3</xsl:param>
    282301<xsl:param name="link.mailto.url"/>
     302<xsl:param name="make.clean.html" select="0"/>
    283303<xsl:param name="make.graphic.viewport" select="1"/>
    284304<xsl:param name="make.single.year.ranges" select="0"/>
     
    300320<xsl:param name="olink.base.uri"/>
    301321<xsl:param name="olink.debug" select="0"/>
     322<xsl:param name="olink.doctitle">no</xsl:param>
     323<xsl:param name="olink.lang.fallback.sequence"/>
    302324<xsl:attribute-set name="olink.properties">
    303325  <xsl:attribute name="show-destination">replace</xsl:attribute>
    304326</xsl:attribute-set>
    305 <xsl:param name="insert.olink.page.number">no</xsl:param>
    306 <xsl:param name="insert.olink.pdf.frag" select="0"/>
    307 <xsl:param name="prefer.internal.olink" select="0"/>
    308 <xsl:param name="olink.lang.fallback.sequence"/>
    309 <xsl:param name="olink.doctitle">no</xsl:param>
    310 <xsl:param name="olink.fragid">fragid=</xsl:param>
    311 <xsl:param name="olink.outline.ext">.olink</xsl:param>
    312 <xsl:param name="olink.pubid">pubid</xsl:param>
    313   <xsl:param name="olink.resolver">/cgi-bin/olink</xsl:param>
    314 <xsl:param name="olink.sysid">sysid</xsl:param>
    315 <xsl:param name="abstract.notitle.enabled" select="0"/>
    316327<xsl:param name="othercredit.like.author.enabled">0</xsl:param>
    317328<xsl:param name="para.propagates.style" select="1"/>
     
    321332<xsl:param name="points.per.em">10</xsl:param>
    322333<xsl:param name="preface.autolabel" select="0"/>
     334<xsl:param name="prefer.internal.olink" select="0"/>
    323335<xsl:param name="preferred.mediaobject.role"/>
    324336<xsl:param name="process.empty.source.toc" select="0"/>
    325337<xsl:param name="process.source.toc" select="0"/>
    326338<xsl:param name="profile.arch"/>
     339<xsl:param name="profile.attribute"/>
    327340<xsl:param name="profile.audience"/>
    328 <xsl:param name="profile.attribute"/>
    329341<xsl:param name="profile.condition"/>
    330342<xsl:param name="profile.conformance"/>
     
    343355<xsl:param name="punct.honorific">.</xsl:param>
    344356<xsl:param name="qanda.defaultlabel">number</xsl:param>
     357<xsl:param name="qanda.in.toc" select="0"/>
    345358<xsl:param name="qanda.inherit.numeration" select="1"/>
    346 <xsl:param name="qanda.in.toc" select="0"/>
    347359<xsl:param name="qanda.nested.in.toc" select="0"/>
    348360<xsl:param name="qandadiv.autolabel" select="1"/>
     361<xsl:param name="refclass.suppress" select="0"/>
    349362<xsl:param name="refentry.generate.name" select="1"/>
    350363<xsl:param name="refentry.generate.title" select="0"/>
     
    352365<xsl:param name="refentry.xref.manvolnum" select="1"/>
    353366  <xsl:param name="reference.autolabel">I</xsl:param>
    354 <xsl:param name="refclass.suppress" select="0"/>
    355367<xsl:param name="root.filename">index</xsl:param>
    356368<xsl:param name="rootid"/>
     
    388400 <xsl:param name="target.database.document">olinkdb.xml</xsl:param>
    389401<xsl:param name="targets.filename">target.db</xsl:param>
    390 <xsl:param name="textdata.default.encoding"/>
    391402<xsl:param name="tex.math.delims" select="1"/>
    392403<xsl:param name="tex.math.file">tex-math-equations.tex</xsl:param>
    393404<xsl:param name="tex.math.in.alt"/>
     405<xsl:param name="textdata.default.encoding"/>
    394406  <xsl:param name="textinsert.extension" select="1"/>
    395407<xsl:param name="toc.list.type">dl</xsl:param>
     408<xsl:param name="toc.max.depth">8</xsl:param>
    396409<xsl:param name="toc.section.depth">2</xsl:param>
    397 <xsl:param name="toc.max.depth">8</xsl:param>
    398410<xsl:param name="ulink.target">_top</xsl:param>
    399411<xsl:param name="use.embed.for.svg" select="0"/>
     
    405417<xsl:param name="use.svg" select="1"/>
    406418<xsl:param name="variablelist.as.table" select="0"/>
     419<xsl:param name="variablelist.term.break.after">0</xsl:param>
    407420<xsl:param name="variablelist.term.separator">, </xsl:param>
    408 <xsl:param name="variablelist.term.break.after">0</xsl:param>
     421<xsl:param name="webhelp.autolabel">0</xsl:param>
     422<xsl:param name="webhelp.base.dir">docs</xsl:param>
     423<xsl:param name="webhelp.common.dir">../common/</xsl:param>
     424<xsl:param name="webhelp.default.topic">index.html</xsl:param>
     425<xsl:param name="webhelp.include.search.tab">1</xsl:param>
     426<xsl:param name="webhelp.indexer.language">en</xsl:param>
     427<xsl:param name="webhelp.start.filename">index.html</xsl:param>
     428<xsl:param name="webhelp.tree.cookie.id" select="concat( 'treeview-', count(//node()) )"/>
     429<xsl:param name="writing.mode">
     430  <xsl:call-template name="gentext">
     431    <xsl:with-param name="key">writing-mode</xsl:with-param>
     432    <xsl:with-param name="lang">
     433      <xsl:call-template name="l10n.language">
     434        <xsl:with-param name="target" select="/*[1]"/>
     435      </xsl:call-template>
     436    </xsl:with-param>
     437  </xsl:call-template>
     438</xsl:param>
     439<xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param>
     440<xsl:param name="xref.label-title.separator">: </xsl:param>
     441<xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param>
    409442<xsl:param name="xref.with.number.and.title" select="1"/>
    410 <xsl:param name="xref.label-title.separator">: </xsl:param>
    411 <xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param>
    412 <xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param>
    413443
    414444</xsl:stylesheet>
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/table.xsl

    rf2a5108 rb1a51ac1  
    77
    88<!-- ********************************************************************
    9      $Id$
     9     $Id: table.xsl 9297 2012-04-22 03:56:16Z bobstayton $
    1010     ********************************************************************
    1111
     
    167167      <xsl:when test="../title">
    168168        <xsl:attribute name="summary">
     169          <!-- This screws up on inline markup and footnotes, oh well... -->
    169170          <xsl:value-of select="string(../title)"/>
    170171        </xsl:attribute>
     
    293294            </xsl:attribute>
    294295          </xsl:when>
    295           <xsl:when test="../@frame='none'">
    296             <xsl:attribute name="style">
    297               <xsl:text>border: none;</xsl:text>
    298             </xsl:attribute>
    299           </xsl:when>
     296          <xsl:when test="../@frame='none'">
     297            <xsl:attribute name="style">
     298              <xsl:text>border: none;</xsl:text>
     299            </xsl:attribute>
     300          </xsl:when>
    300301          <xsl:otherwise>
    301302            <xsl:attribute name="style">
     
    398399    <xsl:apply-templates select="tbody"/>
    399400
    400     <xsl:if test=".//footnote">
     401    <xsl:if test=".//footnote|../title//footnote">
    401402      <tbody class="footnotes">
    402403        <tr>
    403404          <td colspan="{@cols}">
    404             <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/>
     405            <xsl:apply-templates select=".//footnote|../title//footnote" mode="table.footnote.mode"/>
    405406          </td>
    406407        </tr>
     
    450451    </xsl:if>
    451452
    452     <xsl:apply-templates select="row[1]">
    453       <xsl:with-param name="spans">
    454         <xsl:call-template name="blank.spans">
    455           <xsl:with-param name="cols" select="../@cols"/>
    456         </xsl:call-template>
    457       </xsl:with-param>
    458     </xsl:apply-templates>
     453    <xsl:choose>
     454      <!-- recurse on rows only if @morerows is present -->
     455      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
     456        <xsl:apply-templates select="row[1]">
     457          <xsl:with-param name="spans">
     458            <xsl:call-template name="blank.spans">
     459              <xsl:with-param name="cols" select="../@cols"/>
     460            </xsl:call-template>
     461          </xsl:with-param>
     462          <xsl:with-param name="browserows" select="'recurse'"/>
     463        </xsl:apply-templates>
     464      </xsl:when>
     465      <xsl:otherwise>
     466        <xsl:apply-templates select="row">
     467          <xsl:with-param name="spans">
     468            <xsl:call-template name="blank.spans">
     469              <xsl:with-param name="cols" select="../@cols"/>
     470            </xsl:call-template>
     471          </xsl:with-param>
     472          <xsl:with-param name="browserows" select="'loop'"/>
     473        </xsl:apply-templates>
     474      </xsl:otherwise>
     475    </xsl:choose>
    459476
    460477  </xsl:element>
     
    484501    </xsl:if>
    485502
    486     <xsl:apply-templates select="row[1]">
    487       <xsl:with-param name="spans">
    488         <xsl:call-template name="blank.spans">
    489           <xsl:with-param name="cols" select="../@cols"/>
    490         </xsl:call-template>
    491       </xsl:with-param>
    492     </xsl:apply-templates>
     503    <xsl:choose>
     504      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
     505        <xsl:apply-templates select="row[1]">
     506          <xsl:with-param name="spans">
     507            <xsl:call-template name="blank.spans">
     508              <xsl:with-param name="cols" select="../@cols"/>
     509            </xsl:call-template>
     510          </xsl:with-param>
     511          <xsl:with-param name="browserows" select="'recurse'"/>
     512        </xsl:apply-templates>
     513      </xsl:when>
     514      <xsl:otherwise>
     515        <xsl:apply-templates select="row">
     516          <xsl:with-param name="spans">
     517            <xsl:call-template name="blank.spans">
     518              <xsl:with-param name="cols" select="../@cols"/>
     519            </xsl:call-template>
     520          </xsl:with-param>
     521          <xsl:with-param name="browserows" select="'loop'"/>
     522        </xsl:apply-templates>
     523      </xsl:otherwise>
     524    </xsl:choose>
    493525
    494526  </tbody>
     
    497529<xsl:template match="row">
    498530  <xsl:param name="spans"/>
     531  <xsl:param name="browserows"/>
    499532
    500533  <xsl:choose>
    501534    <xsl:when test="contains($spans, '0')">
    502535      <xsl:call-template name="normal-row">
    503         <xsl:with-param name="spans" select="$spans"/>
     536        <xsl:with-param name="spans" select="$spans"/>
     537        <xsl:with-param name="browserows" select="$browserows"/>
    504538      </xsl:call-template>
    505539    </xsl:when>
     
    507541      <!--
    508542      <xsl:message>
    509         <xsl:text>Ignoring row: </xsl:text>
    510         <xsl:value-of select="$spans"/>
    511         <xsl:text> = </xsl:text>
    512         <xsl:call-template name="consume-row">
    513           <xsl:with-param name="spans" select="$spans"/>
    514         </xsl:call-template>
     543        <xsl:text>Ignoring row: </xsl:text>
     544        <xsl:value-of select="$spans"/>
     545        <xsl:text> = </xsl:text>
     546        <xsl:call-template name="consume-row">
     547          <xsl:with-param name="spans" select="$spans"/>
     548        </xsl:call-template>
    515549      </xsl:message>
    516550      -->
    517551
    518552      <xsl:if test="normalize-space(.//text()) != ''">
    519         <xsl:message>Warning: overlapped row contains content!</xsl:message>
     553        <xsl:message>Warning: overlapped row contains content!</xsl:message>
    520554      </xsl:if>
    521555
    522556      <tr><xsl:comment> This row intentionally left blank </xsl:comment></tr>
    523557
    524       <xsl:apply-templates select="following-sibling::row[1]">
    525         <xsl:with-param name="spans">
    526           <xsl:call-template name="consume-row">
    527             <xsl:with-param name="spans" select="$spans"/>
    528           </xsl:call-template>
    529         </xsl:with-param>
    530       </xsl:apply-templates>
     558      <xsl:if test="$browserows = 'recurse'">
     559        <xsl:apply-templates select="following-sibling::row[1]">
     560          <xsl:with-param name="spans">
     561            <xsl:call-template name="consume-row">
     562              <xsl:with-param name="spans" select="$spans"/>
     563            </xsl:call-template>
     564          </xsl:with-param>
     565          <xsl:with-param name="browserows" select="$browserows"/>
     566        </xsl:apply-templates>
     567      </xsl:if>
    531568    </xsl:otherwise>
    532569  </xsl:choose>
     
    535572<xsl:template name="normal-row">
    536573  <xsl:param name="spans"/>
     574  <xsl:param name="browserows"/>
    537575
    538576  <xsl:variable name="row-height">
     
    555593
    556594  <tr>
     595    <xsl:call-template name="id.attribute"/>
    557596    <xsl:call-template name="tr.attributes">
    558597      <xsl:with-param name="rownum">
     
    615654  </tr>
    616655
    617   <xsl:if test="following-sibling::row">
    618     <xsl:variable name="nextspans">
    619       <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
    620         <xsl:with-param name="spans" select="$spans"/>
     656  <xsl:if test="$browserows = 'recurse'">
     657    <xsl:if test="following-sibling::row">
     658      <xsl:variable name="nextspans">
     659        <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
     660          <xsl:with-param name="spans" select="$spans"/>
     661        </xsl:apply-templates>
     662      </xsl:variable>
     663 
     664      <xsl:apply-templates select="following-sibling::row[1]">
     665        <xsl:with-param name="spans" select="$nextspans"/>
     666        <xsl:with-param name="browserows" select="$browserows"/>
    621667      </xsl:apply-templates>
    622     </xsl:variable>
    623 
    624     <xsl:apply-templates select="following-sibling::row[1]">
    625       <xsl:with-param name="spans" select="$nextspans"/>
    626     </xsl:apply-templates>
     668    </xsl:if>
    627669  </xsl:if>
    628670</xsl:template>
    629671
    630672<xsl:template match="entry|entrytbl" name="entry">
    631   <xsl:param name="col" select="1"/>
     673  <xsl:param name="col">
     674    <xsl:choose>
     675      <xsl:when test="@revisionflag">
     676        <xsl:number from="row"/>
     677      </xsl:when>
     678      <xsl:otherwise>1</xsl:otherwise>
     679    </xsl:choose>
     680  </xsl:param>
     681
    632682  <xsl:param name="spans"/>
    633683
     
    636686      <xsl:when test="ancestor::thead">th</xsl:when>
    637687      <xsl:when test="ancestor::tfoot">th</xsl:when>
     688      <xsl:when test="ancestor::tbody and                        (ancestor::table[@rowheader = 'firstcol'] or                       ancestor::informaltable[@rowheader = 'firstcol']) and                       ancestor-or-self::entry[1][count(preceding-sibling::entry) = 0]">
     689        <xsl:text>th</xsl:text>
     690      </xsl:when>
    638691      <xsl:otherwise>td</xsl:otherwise>
    639692    </xsl:choose>
     
    676729    <xsl:choose>
    677730      <!-- If this is the last row, rowsep never applies. -->
    678       <xsl:when test="ancestor::entrytbl                       and not (ancestor-or-self::row[1]/following-sibling::row)">
     731      <xsl:when test="ancestor::entrytbl                       and not (ancestor-or-self::row[1]/following-sibling::row)                       and not (ancestor::thead)">
    679732        <xsl:value-of select="0"/>
    680733      </xsl:when>
     
    765818
    766819      <xsl:element name="{$cellgi}" namespace="http://www.w3.org/1999/xhtml">
     820        <xsl:call-template name="id.attribute"/>
    767821        <xsl:if test="$bgcolor != ''">
    768822          <xsl:attribute name="bgcolor">
     
    771825        </xsl:if>
    772826
    773         <xsl:if test="$entry.propagates.style != 0 and @role">
    774           <xsl:apply-templates select="." mode="class.attribute">
    775             <xsl:with-param name="class" select="@role"/>
    776           </xsl:apply-templates>
    777         </xsl:if>
     827        <xsl:call-template name="locale.html.attributes"/>
     828        <xsl:choose>
     829          <xsl:when test="$entry.propagates.style != 0 and @role">
     830            <xsl:apply-templates select="." mode="class.attribute">
     831              <xsl:with-param name="class" select="@role"/>
     832            </xsl:apply-templates>
     833          </xsl:when>
     834          <xsl:otherwise>
     835            <xsl:apply-templates select="." mode="class.attribute">
     836              <xsl:with-param name="class" select="''"/>
     837            </xsl:apply-templates>
     838          </xsl:otherwise>
     839        </xsl:choose>
    778840
    779841        <xsl:if test="$show.revisionflag and @revisionflag">
     
    910972      <xsl:text>0:</xsl:text>
    911973      <xsl:call-template name="sentry">
    912         <xsl:with-param name="col" select="$col+$entry.colspan"/>
    913         <xsl:with-param name="spans" select="$following.spans"/>
     974        <xsl:with-param name="col" select="$col + 1"/>
     975        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
    914976      </xsl:call-template>
    915977    </xsl:when>
     
    9891051        <xsl:when test="$colspec.colnum=$countcol">
    9901052          <col>
    991             <xsl:if test="$colspec/@colwidth                           and $use.extensions != 0                           and $tablecolumns.extension != 0">
    992               <xsl:attribute name="width">
    993                 <xsl:choose>
    994                   <xsl:when test="normalize-space($colspec/@colwidth) = '*'">
    995                     <xsl:value-of select="'1*'"/>
    996                   </xsl:when>
    997                   <xsl:otherwise>
    998                     <xsl:value-of select="$colspec/@colwidth"/>
    999                   </xsl:otherwise>
    1000                 </xsl:choose>
    1001               </xsl:attribute>
    1002             </xsl:if>
     1053            <xsl:choose>
     1054              <xsl:when test="$colspec/@colwidth                             and $use.extensions != 0                             and $tablecolumns.extension != 0">
     1055                <xsl:attribute name="width">
     1056                  <xsl:choose>
     1057                    <xsl:when test="normalize-space($colspec/@colwidth) = '*'">
     1058                      <xsl:value-of select="'1*'"/>
     1059                    </xsl:when>
     1060                    <xsl:otherwise>
     1061                      <xsl:value-of select="$colspec/@colwidth"/>
     1062                    </xsl:otherwise>
     1063                  </xsl:choose>
     1064                </xsl:attribute>
     1065              </xsl:when>
     1066              <!-- pass through to HTML if no * in colspecs -->
     1067              <xsl:when test="$colspec/@colwidth and                              not($colspec/parent::*/colspec/@colwidth[contains(.,'*')])">
     1068                <xsl:attribute name="width">
     1069                  <xsl:choose>
     1070                    <xsl:when test="normalize-space($colspec/@colwidth) = '*'">
     1071                      <xsl:value-of select="'1*'"/>
     1072                    </xsl:when>
     1073                    <xsl:otherwise>
     1074                      <xsl:value-of select="$colspec/@colwidth"/>
     1075                    </xsl:otherwise>
     1076                  </xsl:choose>
     1077                </xsl:attribute>
     1078              </xsl:when>
     1079            </xsl:choose>
    10031080
    10041081            <xsl:choose>
     
    10211098              </xsl:attribute>
    10221099            </xsl:if>
     1100           
    10231101            <xsl:if test="$colspec/@charoff">
    10241102              <xsl:attribute name="charoff">
    10251103                <xsl:value-of select="$colspec/@charoff"/>
     1104              </xsl:attribute>
     1105            </xsl:if>
     1106
     1107            <xsl:if test="$colspec/@colname">
     1108              <xsl:attribute name="class">
     1109                <xsl:value-of select="$colspec/@colname"/>
    10261110              </xsl:attribute>
    10271111            </xsl:if>
  • stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml/xref.xsl

    rf2a5108 rb1a51ac1  
    55
    66<!-- ********************************************************************
    7      $Id$
     7     $Id: xref.xsl 9713 2013-01-22 22:08:30Z bobstayton $
    88     ********************************************************************
    99
     
    2020
    2121<xsl:template match="anchor">
    22   <xsl:call-template name="anchor"/>
     22  <xsl:choose>
     23    <xsl:when test="$generate.id.attributes = 0">
     24      <xsl:call-template name="anchor"/>
     25    </xsl:when>
     26    <xsl:otherwise>
     27      <span>
     28        <xsl:call-template name="id.attribute"/>
     29      </span>
     30    </xsl:otherwise>
     31  </xsl:choose>
    2332</xsl:template>
    2433
     
    152161          </xsl:message>
    153162          <a href="{$href}">
    154             <xsl:apply-templates select="." mode="class.attribute"/>
     163            <xsl:apply-templates select="." mode="common.html.attributes"/>
     164            <xsl:call-template name="id.attribute"/>
    155165            <xsl:text>???</xsl:text>
    156166          </a>
     
    158168        <xsl:otherwise>
    159169          <a href="{$href}">
    160             <xsl:apply-templates select="." mode="class.attribute"/>
     170            <xsl:apply-templates select="." mode="common.html.attributes"/>
     171            <xsl:call-template name="id.attribute"/>
    161172            <xsl:apply-templates select="$etarget" mode="endterm"/>
    162173          </a>
     
    167178    <xsl:when test="$target/@xreflabel">
    168179      <a>
    169         <xsl:apply-templates select="." mode="class.attribute"/>
     180        <xsl:apply-templates select="." mode="common.html.attributes"/>
    170181        <xsl:attribute name="href">
    171182          <xsl:call-template name="href.target">
     
    192203      <a href="{$href}">
    193204        <xsl:apply-templates select="." mode="class.attribute"/>
    194         <xsl:if test="$target/title or $target/*/title">
     205        <xsl:if test="$target/title or $target/info/title">
    195206          <xsl:attribute name="title">
    196207            <xsl:apply-templates select="$target" mode="xref-title"/>
     
    224235  <!-- Process the children of the endterm element -->
    225236  <xsl:variable name="endterm">
    226     <xsl:apply-templates select="child::node()"/>
     237    <xsl:apply-templates select="child::node()" mode="no.anchor.mode"/>
    227238  </xsl:variable>
    228239
    229240  <xsl:choose>
    230     <xsl:when test="function-available('exsl:node-set')">
     241    <xsl:when test="$exsl.node.set.available != 0">
    231242      <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/>
    232243    </xsl:when>
     
    328339</xsl:template>
    329340
    330 <xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset                      |biblioset|blockquote|calloutlist|caution|colophon                      |constraintdef|formalpara|glossdiv|important|indexdiv                      |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain                      |msgrel|msgset|msgsub|note|orderedlist|partintro                      |productionset|qandadiv|refsynopsisdiv|segmentedlist                      |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to">
     341<xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset                      |biblioset|blockquote|calloutlist|caution|colophon                      |constraintdef|formalpara|glossdiv|important|indexdiv                      |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain                      |msgrel|msgset|msgsub|note|orderedlist|partintro                      |productionset|qandadiv|refsynopsisdiv|screenshot|segmentedlist                      |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to">
    331342  <xsl:param name="referrer"/>
    332343  <xsl:param name="xrefstyle"/>
     
    403414</xsl:template>
    404415
    405 <xsl:template match="dedication|preface|chapter|appendix|article" mode="xref-to">
     416<xsl:template match="dedication|acknowledgements|preface|chapter|appendix|article" mode="xref-to">
    406417  <xsl:param name="referrer"/>
    407418  <xsl:param name="xrefstyle"/>
     
    455466            </xsl:when>
    456467            <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
    457               <xsl:apply-templates select="$entry/*[1]"/>
     468              <xsl:apply-templates select="$entry/*[1]" mode="no.anchor.mode"/>
    458469            </xsl:when>
    459470            <xsl:otherwise>
     
    479490        </xsl:when>
    480491        <xsl:when test="local-name(*[1]) = 'abbrev'">
    481           <xsl:apply-templates select="*[1]"/>
     492          <xsl:apply-templates select="*[1]" mode="no.anchor.mode"/>
    482493        </xsl:when>
    483494        <xsl:otherwise>
     
    510521      <xsl:choose>
    511522        <xsl:when test="acronym|abbrev">
    512           <xsl:apply-templates select="(acronym|abbrev)[1]"/>
     523          <xsl:apply-templates select="(acronym|abbrev)[1]" mode="no.anchor.mode"/>
    513524        </xsl:when>
    514525        <xsl:otherwise>
     
    531542</xsl:template>
    532543
    533 <xsl:template match="glossterm" mode="xref-to">
    534   <xsl:apply-templates/>
     544<xsl:template match="glossterm|firstterm" mode="xref-to">
     545  <xsl:apply-templates mode="no.anchor.mode"/>
    535546</xsl:template>
    536547
     
    575586</xsl:template>
    576587
     588<xsl:template match="topic" mode="xref-to">
     589  <xsl:param name="referrer"/>
     590  <xsl:param name="xrefstyle"/>
     591  <xsl:param name="verbose" select="1"/>
     592
     593  <xsl:apply-templates select="." mode="object.xref.markup">
     594    <xsl:with-param name="purpose" select="'xref'"/>
     595    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     596    <xsl:with-param name="referrer" select="$referrer"/>
     597    <xsl:with-param name="verbose" select="$verbose"/>
     598  </xsl:apply-templates>
     599</xsl:template>
     600
    577601<xsl:template match="bridgehead" mode="xref-to">
    578602  <xsl:param name="referrer"/>
     
    602626</xsl:template>
    603627
    604 <xsl:template match="qandadiv" mode="xref-to">
    605   <xsl:param name="referrer"/>
    606   <xsl:param name="xrefstyle"/>
    607   <xsl:param name="verbose" select="1"/>
    608 
    609   <xsl:apply-templates select="." mode="object.xref.markup">
    610     <xsl:with-param name="purpose" select="'xref'"/>
    611     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
    612     <xsl:with-param name="referrer" select="$referrer"/>
    613     <xsl:with-param name="verbose" select="$verbose"/>
    614   </xsl:apply-templates>
    615 </xsl:template>
    616 
    617628<xsl:template match="qandaentry" mode="xref-to">
    618629  <xsl:param name="referrer"/>
     
    620631  <xsl:param name="verbose" select="1"/>
    621632
    622   <xsl:apply-templates select="question[1]" mode="object.xref.markup">
    623     <xsl:with-param name="purpose" select="'xref'"/>
     633  <xsl:apply-templates select="question[1]" mode="xref-to">
    624634    <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
    625635    <xsl:with-param name="referrer" select="$referrer"/>
     
    633643  <xsl:param name="verbose" select="1"/>
    634644
    635   <xsl:apply-templates select="." mode="object.xref.markup">
    636     <xsl:with-param name="purpose" select="'xref'"/>
    637     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
    638     <xsl:with-param name="referrer" select="$referrer"/>
    639     <xsl:with-param name="verbose" select="$verbose"/>
    640   </xsl:apply-templates>
     645  <xsl:choose>
     646    <xsl:when test="string-length(label) != 0">
     647      <xsl:apply-templates select="." mode="label.markup"/>
     648    </xsl:when>
     649    <xsl:otherwise>
     650      <xsl:apply-templates select="." mode="object.xref.markup">
     651        <xsl:with-param name="purpose" select="'xref'"/>
     652        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     653        <xsl:with-param name="referrer" select="$referrer"/>
     654        <xsl:with-param name="verbose" select="$verbose"/>
     655      </xsl:apply-templates>
     656    </xsl:otherwise>
     657  </xsl:choose>
    641658</xsl:template>
    642659
     
    660677  <xsl:choose>
    661678    <xsl:when test="refmeta/refentrytitle">
    662       <xsl:apply-templates select="refmeta/refentrytitle"/>
    663     </xsl:when>
    664     <xsl:otherwise>
    665       <xsl:apply-templates select="refnamediv/refname[1]"/>
    666     </xsl:otherwise>
    667   </xsl:choose>
    668   <xsl:apply-templates select="refmeta/manvolnum"/>
     679      <xsl:apply-templates select="refmeta/refentrytitle" mode="no.anchor.mode"/>
     680    </xsl:when>
     681    <xsl:otherwise>
     682      <xsl:apply-templates select="refnamediv/refname[1]" mode="no.anchor.mode"/>
     683    </xsl:otherwise>
     684  </xsl:choose>
     685  <xsl:apply-templates select="refmeta/manvolnum" mode="no.anchor.mode"/>
    669686</xsl:template>
    670687
     
    712729</xsl:template>
    713730
     731<xsl:template match="primary|secondary|tertiary" mode="xref-to">
     732  <xsl:value-of select="."/>
     733</xsl:template>
     734
     735<xsl:template match="indexterm" mode="xref-to">
     736  <xsl:value-of select="primary"/>
     737</xsl:template>
     738
    714739<xsl:template match="varlistentry/term" mode="xref-to">
    715740  <xsl:param name="referrer"/>
    716741  <xsl:param name="xrefstyle"/>
    717742
    718   <!-- to avoid the comma that will be generated if there are several terms -->
    719   <xsl:apply-templates/>
     743  <xsl:apply-templates mode="no.anchor.mode"/>
    720744</xsl:template>
    721745
     
    751775</xsl:template>
    752776
    753 <xsl:template match="para" mode="xref-to">
    754   <xsl:param name="referrer"/>
    755   <xsl:param name="xrefstyle"/>
    756   <xsl:param name="verbose" select="1"/>
    757 
    758   <xsl:variable name="context" select="(ancestor::simplesect                                        |ancestor::section                                        |ancestor::sect1                                        |ancestor::sect2                                        |ancestor::sect3                                        |ancestor::sect4                                        |ancestor::sect5                                        |ancestor::refsection                                        |ancestor::refsect1                                        |ancestor::refsect2                                        |ancestor::refsect3                                        |ancestor::chapter                                        |ancestor::appendix                                        |ancestor::preface                                        |ancestor::partintro                                        |ancestor::dedication                                        |ancestor::colophon                                        |ancestor::bibliography                                        |ancestor::index                                        |ancestor::glossary                                        |ancestor::glossentry                                        |ancestor::listitem                                        |ancestor::varlistentry)[last()]"/>
    759 
    760   <xsl:apply-templates select="$context" mode="xref-to">
    761     <xsl:with-param name="purpose" select="'xref'"/>
    762     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
    763     <xsl:with-param name="referrer" select="$referrer"/>
    764     <xsl:with-param name="verbose" select="$verbose"/>
    765   </xsl:apply-templates>
     777<!-- These are elements for which no link text exists, so an xref to one
     778     uses the xrefstyle attribute if specified, or if not it falls back
     779     to the container element's link text -->
     780<xsl:template match="para|phrase|simpara|anchor|quote" mode="xref-to">
     781  <xsl:param name="referrer"/>
     782  <xsl:param name="xrefstyle"/>
     783  <xsl:param name="verbose" select="1"/>
     784
     785  <xsl:variable name="context" select="(ancestor::simplesect                                        |ancestor::section                                        |ancestor::sect1                                        |ancestor::sect2                                        |ancestor::sect3                                        |ancestor::sect4                                        |ancestor::sect5                                        |ancestor::topic                                        |ancestor::refsection                                        |ancestor::refsect1                                        |ancestor::refsect2                                        |ancestor::refsect3                                        |ancestor::chapter                                        |ancestor::appendix                                        |ancestor::preface                                        |ancestor::partintro                                        |ancestor::dedication                                        |ancestor::acknowledgements                                        |ancestor::colophon                                        |ancestor::bibliography                                        |ancestor::index                                        |ancestor::glossary                                        |ancestor::glossentry                                        |ancestor::listitem                                        |ancestor::varlistentry)[last()]"/>
     786
     787  <xsl:choose>
     788    <xsl:when test="$xrefstyle != ''">
     789      <xsl:apply-templates select="." mode="object.xref.markup">
     790        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     791        <xsl:with-param name="referrer" select="$referrer"/>
     792        <xsl:with-param name="verbose" select="$verbose"/>
     793      </xsl:apply-templates>
     794    </xsl:when>
     795    <xsl:otherwise>
     796      <xsl:apply-templates select="$context" mode="xref-to">
     797        <xsl:with-param name="purpose" select="'xref'"/>
     798        <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     799        <xsl:with-param name="referrer" select="$referrer"/>
     800        <xsl:with-param name="verbose" select="$verbose"/>
     801      </xsl:apply-templates>
     802    </xsl:otherwise>
     803  </xsl:choose>
    766804</xsl:template>
    767805
     
    814852    <xsl:choose>
    815853      <xsl:when test="local-name(*[1]) = 'abbrev'">
    816         <xsl:apply-templates select="*[1]"/>
     854        <xsl:apply-templates select="*[1]" mode="no.anchor.mode"/>
    817855      </xsl:when>
    818856      <xsl:otherwise>
     
    862900      <xsl:when test="count(child::node()) &gt; 0">
    863901        <!-- If it has content, use it -->
    864         <xsl:apply-templates/>
     902        <xsl:apply-templates mode="no.anchor.mode"/>
    865903      </xsl:when>
    866904      <!-- else look for an endterm -->
     
    911949  <xsl:variable name="link">
    912950    <a>
    913       <xsl:apply-templates select="." mode="class.attribute"/>
     951      <xsl:apply-templates select="." mode="common.html.attributes"/>
    914952      <xsl:if test="@id or @xml:id">
    915         <xsl:attribute name="id">
    916           <xsl:value-of select="(@id|@xml:id)[1]"/>
    917         </xsl:attribute>
     953        <xsl:choose>
     954          <xsl:when test="$generate.id.attributes = 0">
     955            <xsl:attribute name="id">
     956              <xsl:value-of select="(@id|@xml:id)[1]"/>
     957            </xsl:attribute>
     958          </xsl:when>
     959          <xsl:otherwise>
     960            <xsl:attribute name="id">
     961              <xsl:value-of select="(@id|@xml:id)[1]"/>
     962            </xsl:attribute>
     963          </xsl:otherwise>
     964        </xsl:choose>
    918965      </xsl:if>
    919966      <xsl:attribute name="href"><xsl:value-of select="$url"/></xsl:attribute>
     
    928975        </xsl:when>
    929976        <xsl:otherwise>
    930           <xsl:apply-templates/>
     977          <xsl:apply-templates mode="no.anchor.mode"/>
    931978        </xsl:otherwise>
    932979      </xsl:choose>
     
    949996
    950997  <xsl:call-template name="anchor"/>
    951 
    952   <xsl:variable name="localinfo" select="@localinfo"/>
    953998
    954999  <xsl:choose>
     
    10331078      <xsl:variable name="hottext">
    10341079        <xsl:choose>
    1035           <xsl:when test="$content">
     1080          <xsl:when test="string-length($content) != 0">
    10361081            <xsl:copy-of select="$content"/>
    10371082          </xsl:when>
     
    10651110        <xsl:when test="$href != ''">
    10661111          <a href="{$href}">
    1067             <xsl:apply-templates select="." mode="class.attribute"/>
     1112            <xsl:apply-templates select="." mode="common.html.attributes"/>
     1113            <xsl:call-template name="id.attribute"/>
    10681114            <xsl:copy-of select="$hottext"/>
    10691115          </a>
     
    10721118        </xsl:when>
    10731119        <xsl:otherwise>
    1074           <span class="olink"><xsl:copy-of select="$hottext"/></span>
     1120          <span class="olink">
     1121            <xsl:call-template name="id.attribute"/>
     1122            <xsl:copy-of select="$hottext"/>
     1123          </span>
    10751124          <xsl:copy-of select="$olink.page.citation"/>
    10761125          <xsl:copy-of select="$olink.docname.citation"/>
     
    10801129    </xsl:when>
    10811130
    1082     <!-- Or use old olink mechanism -->
    1083     <xsl:otherwise>
    1084       <xsl:variable name="href">
    1085         <xsl:choose>
    1086           <xsl:when test="@linkmode">
    1087             <!-- use the linkmode to get the base URI, use localinfo as fragid -->
    1088             <xsl:variable name="modespec" select="key('id',@linkmode)"/>
    1089             <xsl:if test="count($modespec) != 1                           or local-name($modespec) != 'modespec'">
    1090               <xsl:message>Warning: olink linkmode pointer is wrong.</xsl:message>
    1091             </xsl:if>
    1092             <xsl:value-of select="$modespec"/>
    1093             <xsl:if test="@localinfo">
    1094               <xsl:text>#</xsl:text>
    1095               <xsl:value-of select="@localinfo"/>
    1096             </xsl:if>
    1097           </xsl:when>
    1098           <xsl:when test="@type = 'href'">
    1099             <xsl:call-template name="olink.outline">
    1100               <xsl:with-param name="outline.base.uri" select="unparsed-entity-uri(@targetdocent)"/>
    1101               <xsl:with-param name="localinfo" select="@localinfo"/>
    1102               <xsl:with-param name="return" select="'href'"/>
    1103             </xsl:call-template>
    1104           </xsl:when>
    1105           <xsl:otherwise>
    1106             <xsl:value-of select="$olink.resolver"/>
    1107             <xsl:text>?</xsl:text>
    1108             <xsl:value-of select="$olink.sysid"/>
    1109             <xsl:value-of select="unparsed-entity-uri(@targetdocent)"/>
    1110             <!-- XSL gives no access to the public identifier (grumble...) -->
    1111             <xsl:if test="@localinfo">
    1112               <xsl:text>&amp;</xsl:text>
    1113               <xsl:value-of select="$olink.fragid"/>
    1114               <xsl:value-of select="@localinfo"/>
    1115             </xsl:if>
    1116           </xsl:otherwise>
    1117         </xsl:choose>
    1118       </xsl:variable>
    1119    
     1131    <xsl:otherwise>
    11201132      <xsl:choose>
    1121         <xsl:when test="$href != ''">
    1122           <a href="{$href}">
    1123             <xsl:apply-templates select="." mode="class.attribute"/>
    1124             <xsl:call-template name="olink.hottext"/>
    1125           </a>
     1133        <xsl:when test="@linkmode or @targetdocent or @localinfo">
     1134          <!-- old olink mechanism -->
     1135          <xsl:message>
     1136            <xsl:text>ERROR: olink using obsolete attributes </xsl:text>
     1137            <xsl:text>@linkmode, @targetdocent, @localinfo are </xsl:text>
     1138            <xsl:text>not supported.</xsl:text>
     1139          </xsl:message>
    11261140        </xsl:when>
    11271141        <xsl:otherwise>
    1128           <xsl:call-template name="olink.hottext"/>
     1142          <xsl:message>
     1143            <xsl:text>ERROR: olink is missing linking attributes.</xsl:text>
     1144          </xsl:message>
    11291145        </xsl:otherwise>
    11301146      </xsl:choose>
     
    11351151<xsl:template match="*" mode="pagenumber.markup">
    11361152  <!-- no-op in HTML -->
    1137 </xsl:template>
    1138 
    1139 
    1140 <xsl:template name="olink.outline">
    1141   <xsl:param name="outline.base.uri"/>
    1142   <xsl:param name="localinfo"/>
    1143   <xsl:param name="return" select="href"/>
    1144 
    1145   <xsl:variable name="outline-file" select="concat($outline.base.uri,                                $olink.outline.ext)"/>
    1146 
    1147   <xsl:variable name="outline" select="document($outline-file,.)/div"/>
    1148 
    1149   <xsl:variable name="node-href">
    1150     <xsl:choose>
    1151       <xsl:when test="$localinfo != ''">
    1152         <xsl:variable name="node" select="$outline//                                    *[@id=$localinfo or @xml:id=$localinfo]"/>
    1153         <xsl:value-of select="$node/@href"/>
    1154       </xsl:when>
    1155       <xsl:otherwise>
    1156         <xsl:value-of select="$outline/@href"/>
    1157       </xsl:otherwise>
    1158     </xsl:choose>
    1159   </xsl:variable>
    1160 
    1161   <xsl:variable name="node-xref">
    1162     <xsl:choose>
    1163       <xsl:when test="$localinfo != ''">
    1164         <xsl:variable name="node" select="$outline//                                *[@id=$localinfo or @xml:id=$localinfo]"/>
    1165         <xsl:copy-of select="$node/xref"/>
    1166       </xsl:when>
    1167       <xsl:otherwise>
    1168         <xsl:value-of select="$outline/xref"/>
    1169       </xsl:otherwise>
    1170     </xsl:choose>
    1171   </xsl:variable>
    1172 
    1173   <xsl:choose>
    1174     <xsl:when test="$return = 'href'">
    1175       <xsl:value-of select="$node-href"/>
    1176     </xsl:when>
    1177     <xsl:when test="$return = 'xref'">
    1178       <xsl:value-of select="$node-xref"/>
    1179     </xsl:when>
    1180     <xsl:otherwise>
    1181       <xsl:copy-of select="$node-xref"/>
    1182     </xsl:otherwise>
    1183   </xsl:choose>
    11841153</xsl:template>
    11851154
     
    11971166
    11981167<xsl:template match="title" mode="xref">
    1199   <xsl:apply-templates/>
     1168  <xsl:apply-templates mode="no.anchor.mode"/>
    12001169</xsl:template>
    12011170
     
    12161185
    12171186  <xsl:choose>
    1218     <!-- FIXME: what about the case where titleabbrev is inside the info? -->
    1219     <xsl:when test="$purpose = 'xref' and titleabbrev">
    1220       <xsl:apply-templates select="." mode="titleabbrev.markup"/>
     1187    <xsl:when test="$purpose = 'xref'">
     1188      <xsl:copy-of select="$title"/>
    12211189    </xsl:when>
    12221190    <xsl:otherwise>
     
    12331201  <xsl:choose>
    12341202    <xsl:when test="$purpose = 'xref'">
    1235       <i>
     1203      <em xmlns:xslo="http://www.w3.org/1999/XSL/Transform">
    12361204        <xsl:copy-of select="$title"/>
    1237       </i>
     1205      </em>
    12381206    </xsl:when>
    12391207    <xsl:otherwise>
Note: See TracChangeset for help on using the changeset viewer.