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

File:
1 moved

Legend:

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

    rf2a5108 rb1a51ac1  
    1414
    1515<!-- ********************************************************************
    16      $Id$
     16     $Id: table.xsl 9666 2012-11-14 04:42:56Z bobstayton $
    1717     ********************************************************************
    1818
     
    2828    <title>Formatting Object Table Reference</title>
    2929    <releaseinfo role="meta">
    30       $Id$
     30      $Id: table.xsl 9666 2012-11-14 04:42:56Z bobstayton $
    3131    </releaseinfo>
    3232  </info>
     
    9898      <xsl:apply-templates select="."/>
    9999    </fo:table>
     100
     101    <xsl:for-each select="mediaobject|graphic">
     102      <xsl:apply-templates select="."/>
     103    </xsl:for-each>
     104
    100105  </xsl:for-each>
     106
     107  <xsl:apply-templates select="caption"/>
     108
    101109</xsl:template>
    102110
     
    136144  </xsl:variable>
    137145
     146  <xsl:variable name="keep.together">
     147    <xsl:call-template name="pi.dbfo_keep-together"/>
     148  </xsl:variable>
     149
    138150  <xsl:choose>
    139151    <xsl:when test="self::table">
    140152      <fo:block id="{$id}"
    141153                xsl:use-attribute-sets="table.properties">
     154        <xsl:if test="$keep.together != ''">
     155          <xsl:attribute name="keep-together.within-column">
     156            <xsl:value-of select="$keep.together"/>
     157          </xsl:attribute>
     158        </xsl:if>
    142159        <xsl:if test="$placement = 'before'">
    143160          <xsl:call-template name="formal.object.heading">
     
    157174      <fo:block id="{$id}"
    158175                xsl:use-attribute-sets="informaltable.properties">
     176        <xsl:if test="$keep.together != ''">
     177          <xsl:attribute name="keep-together.within-column">
     178            <xsl:value-of select="$keep.together"/>
     179          </xsl:attribute>
     180        </xsl:if>
    159181        <xsl:copy-of select="$table.layout"/>
    160182        <xsl:call-template name="table.footnote.block"/>
     
    181203  <xsl:choose>
    182204    <xsl:when test="@orient='land' and
    183                     $fop.extensions = 0 and
    184                     $passivetex.extensions = 0" >
     205                    $fop.extensions = 0" >
    185206      <fo:block-container reference-orientation="90"
    186207            padding="6pt"
     
    212233  <xsl:variable name="rowsep">
    213234    <xsl:choose>
    214       <!-- If this is the last row, rowsep never applies. -->
     235      <!-- If this is the last row, rowsep never applies (except when
     236           the ancestor tgroup has a following sibling tgroup) -->
    215237      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
    216238                          or ancestor-or-self::thead/following-sibling::tbody
    217                           or ancestor-or-self::tbody/preceding-sibling::tfoot)">
     239                          or ancestor-or-self::tbody/preceding-sibling::tfoot)
     240                          and not(ancestor::tgroup/following-sibling::tgroup)">
    218241        <xsl:value-of select="0"/>
    219242      </xsl:when>
     
    259282    <xsl:if test="$colsep &gt; 0 and number($colnum) &lt; ancestor::tgroup/@cols">
    260283      <xsl:call-template name="border">
    261         <xsl:with-param name="side" select="'right'"/>
     284        <xsl:with-param name="side" select="'end'"/>
    262285      </xsl:call-template>
    263286    </xsl:if>
     
    270293<!-- ==================================================================== -->
    271294<xsl:template name="table.frame">
    272   <xsl:variable name="frame">
     295  <xsl:param name="frame">
    273296    <xsl:choose>
    274297      <xsl:when test="../@frame">
     
    280303      <xsl:otherwise>all</xsl:otherwise>
    281304    </xsl:choose>
    282   </xsl:variable>
     305  </xsl:param>
     306
    283307
    284308  <xsl:choose>
    285309    <xsl:when test="$frame='all'">
    286       <xsl:attribute name="border-left-style">
     310      <xsl:attribute name="border-start-style">
    287311        <xsl:value-of select="$table.frame.border.style"/>
    288312      </xsl:attribute>
    289       <xsl:attribute name="border-right-style">
     313      <xsl:attribute name="border-end-style">
    290314        <xsl:value-of select="$table.frame.border.style"/>
    291315      </xsl:attribute>
     
    296320        <xsl:value-of select="$table.frame.border.style"/>
    297321      </xsl:attribute>
    298       <xsl:attribute name="border-left-width">
     322      <xsl:attribute name="border-start-width">
    299323        <xsl:value-of select="$table.frame.border.thickness"/>
    300324      </xsl:attribute>
    301       <xsl:attribute name="border-right-width">
     325      <xsl:attribute name="border-end-width">
    302326        <xsl:value-of select="$table.frame.border.thickness"/>
    303327      </xsl:attribute>
     
    308332        <xsl:value-of select="$table.frame.border.thickness"/>
    309333      </xsl:attribute>
    310       <xsl:attribute name="border-left-color">
     334      <xsl:attribute name="border-start-color">
    311335        <xsl:value-of select="$table.frame.border.color"/>
    312336      </xsl:attribute>
    313       <xsl:attribute name="border-right-color">
     337      <xsl:attribute name="border-end-color">
    314338        <xsl:value-of select="$table.frame.border.color"/>
    315339      </xsl:attribute>
     
    322346    </xsl:when>
    323347    <xsl:when test="$frame='bottom'">
    324       <xsl:attribute name="border-left-style">none</xsl:attribute>
    325       <xsl:attribute name="border-right-style">none</xsl:attribute>
     348      <xsl:attribute name="border-start-style">none</xsl:attribute>
     349      <xsl:attribute name="border-end-style">none</xsl:attribute>
    326350      <xsl:attribute name="border-top-style">none</xsl:attribute>
    327351      <xsl:attribute name="border-bottom-style">
     
    336360    </xsl:when>
    337361    <xsl:when test="$frame='sides'">
    338       <xsl:attribute name="border-left-style">
     362      <xsl:attribute name="border-start-style">
    339363        <xsl:value-of select="$table.frame.border.style"/>
    340364      </xsl:attribute>
    341       <xsl:attribute name="border-right-style">
     365      <xsl:attribute name="border-end-style">
    342366        <xsl:value-of select="$table.frame.border.style"/>
    343367      </xsl:attribute>
    344368      <xsl:attribute name="border-top-style">none</xsl:attribute>
    345369      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
    346       <xsl:attribute name="border-left-width">
     370      <xsl:attribute name="border-start-width">
    347371        <xsl:value-of select="$table.frame.border.thickness"/>
    348372      </xsl:attribute>
    349       <xsl:attribute name="border-right-width">
     373      <xsl:attribute name="border-end-width">
    350374        <xsl:value-of select="$table.frame.border.thickness"/>
    351375      </xsl:attribute>
    352       <xsl:attribute name="border-left-color">
     376      <xsl:attribute name="border-start-color">
    353377        <xsl:value-of select="$table.frame.border.color"/>
    354378      </xsl:attribute>
    355       <xsl:attribute name="border-right-color">
     379      <xsl:attribute name="border-end-color">
    356380        <xsl:value-of select="$table.frame.border.color"/>
    357381      </xsl:attribute>
    358382    </xsl:when>
     383    <xsl:when test="$frame='lhs'">
     384      <xsl:attribute name="border-start-style">
     385        <xsl:value-of select="$table.frame.border.style"/>
     386      </xsl:attribute>
     387      <xsl:attribute name="border-end-style">none</xsl:attribute>
     388      <xsl:attribute name="border-top-style">none</xsl:attribute>
     389      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
     390      <xsl:attribute name="border-start-width">
     391        <xsl:value-of select="$table.frame.border.thickness"/>
     392      </xsl:attribute>
     393      <xsl:attribute name="border-start-color">
     394        <xsl:value-of select="$table.frame.border.color"/>
     395      </xsl:attribute>
     396    </xsl:when>
     397    <xsl:when test="$frame='rhs'">
     398      <xsl:attribute name="border-end-style">
     399        <xsl:value-of select="$table.frame.border.style"/>
     400      </xsl:attribute>
     401      <xsl:attribute name="border-end-style">none</xsl:attribute>
     402      <xsl:attribute name="border-top-style">none</xsl:attribute>
     403      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
     404      <xsl:attribute name="border-end-width">
     405        <xsl:value-of select="$table.frame.border.thickness"/>
     406      </xsl:attribute>
     407      <xsl:attribute name="border-end-color">
     408        <xsl:value-of select="$table.frame.border.color"/>
     409      </xsl:attribute>
     410    </xsl:when>
    359411    <xsl:when test="$frame='top'">
    360       <xsl:attribute name="border-left-style">none</xsl:attribute>
    361       <xsl:attribute name="border-right-style">none</xsl:attribute>
     412      <xsl:attribute name="border-start-style">none</xsl:attribute>
     413      <xsl:attribute name="border-end-style">none</xsl:attribute>
    362414      <xsl:attribute name="border-top-style">
    363415        <xsl:value-of select="$table.frame.border.style"/>
     
    372424    </xsl:when>
    373425    <xsl:when test="$frame='topbot'">
    374       <xsl:attribute name="border-left-style">none</xsl:attribute>
    375       <xsl:attribute name="border-right-style">none</xsl:attribute>
     426      <xsl:attribute name="border-start-style">none</xsl:attribute>
     427      <xsl:attribute name="border-end-style">none</xsl:attribute>
    376428      <xsl:attribute name="border-top-style">
    377429        <xsl:value-of select="$table.frame.border.style"/>
     
    394446    </xsl:when>
    395447    <xsl:when test="$frame='none'">
    396       <xsl:attribute name="border-left-style">none</xsl:attribute>
    397       <xsl:attribute name="border-right-style">none</xsl:attribute>
     448      <xsl:attribute name="border-start-style">none</xsl:attribute>
     449      <xsl:attribute name="border-end-style">none</xsl:attribute>
    398450      <xsl:attribute name="border-top-style">none</xsl:attribute>
    399451      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
     
    404456        <xsl:value-of select="$frame"/>
    405457      </xsl:message>
    406       <xsl:attribute name="border-left-style">none</xsl:attribute>
    407       <xsl:attribute name="border-right-style">none</xsl:attribute>
     458      <xsl:attribute name="border-start-style">none</xsl:attribute>
     459      <xsl:attribute name="border-end-style">none</xsl:attribute>
    408460      <xsl:attribute name="border-top-style">none</xsl:attribute>
    409461      <xsl:attribute name="border-bottom-style">none</xsl:attribute>
     
    415467
    416468<xsl:template name="border">
    417   <xsl:param name="side" select="'left'"/>
     469  <xsl:param name="side" select="'start'"/>
    418470
    419471  <xsl:attribute name="border-{$side}-width">
     
    461513  <xsl:if test="count($prop-columns) != 0 or
    462514                $fop.extensions != 0 or
    463                 $fop1.extensions != 0 or
    464                 $passivetex.extensions != 0">
     515                $fop1.extensions != 0">
    465516    <xsl:attribute name="table-layout">fixed</xsl:attribute>
    466517  </xsl:if>
     
    535586    <xsl:choose>
    536587      <!-- CALS table -->
    537       <xsl:when test="@cols">
    538         <xsl:if test="count(colspec) = @cols">
    539           <xsl:for-each select="colspec">
    540             <xsl:if test="position() != 1">
    541               <xsl:text> + </xsl:text>
    542             </xsl:if>
    543             <xsl:choose>
    544               <xsl:when test="not(@colwidth)">NOWIDTH</xsl:when>
    545               <xsl:when test="contains(@colwidth, '*')">NOWIDTH</xsl:when>
    546               <xsl:otherwise>
    547                 <xsl:value-of select="@colwidth"/>
    548               </xsl:otherwise>
    549             </xsl:choose>
    550           </xsl:for-each>
    551         </xsl:if>
     588      <xsl:when test="tgroup/@cols">
     589        <!-- change context to the first tgroup -->
     590        <xsl:for-each select="tgroup[1]">
     591          <xsl:if test="count(colspec) = @cols">
     592            <xsl:for-each select="colspec">
     593              <xsl:if test="position() != 1">
     594                <xsl:text> + </xsl:text>
     595              </xsl:if>
     596              <xsl:choose>
     597                <xsl:when test="not(@colwidth)">NOWIDTH</xsl:when>
     598                <xsl:when test="contains(@colwidth, '*')">NOWIDTH</xsl:when>
     599                <xsl:otherwise>
     600                  <xsl:value-of select="@colwidth"/>
     601                </xsl:otherwise>
     602              </xsl:choose>
     603            </xsl:for-each>
     604          </xsl:if>
     605        </xsl:for-each>
    552606      </xsl:when>
    553607      <xsl:otherwise>
     
    592646          <!-- These processors don't support table-layout="auto" -->
    593647          <xsl:when test="$fop.extensions != 0 or
    594                           $fop1.extensions != 0 or
    595                           $passivetex.extensions != 0">
     648                          $fop1.extensions != 0">
    596649            <xsl:text>100%</xsl:text>
    597650          </xsl:when>
     
    620673
    621674  <fo:table-header start-indent="0pt" end-indent="0pt">
    622     <xsl:apply-templates select="row[1]">
    623       <xsl:with-param name="spans">
    624         <xsl:call-template name="blank.spans">
    625           <xsl:with-param name="cols" select="../@cols"/>
    626         </xsl:call-template>
    627       </xsl:with-param>
    628     </xsl:apply-templates>
     675    <xsl:choose>
     676      <!-- Use recursion if @morerows is used -->
     677      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
     678        <xsl:apply-templates select="row[1]">
     679          <xsl:with-param name="spans">
     680            <xsl:call-template name="blank.spans">
     681              <xsl:with-param name="cols" select="../@cols"/>
     682            </xsl:call-template>
     683          </xsl:with-param>
     684          <xsl:with-param name="browserows" select="'recurse'"/>
     685        </xsl:apply-templates>
     686      </xsl:when>
     687      <xsl:otherwise>
     688        <xsl:apply-templates select="row">
     689          <xsl:with-param name="spans">
     690            <xsl:call-template name="blank.spans">
     691              <xsl:with-param name="cols" select="../@cols"/>
     692            </xsl:call-template>
     693          </xsl:with-param>
     694          <xsl:with-param name="browserows" select="'loop'" />
     695        </xsl:apply-templates>
     696      </xsl:otherwise>
     697    </xsl:choose>
    629698  </fo:table-header>
    630699</xsl:template>
     
    634703
    635704  <fo:table-footer start-indent="0pt" end-indent="0pt">
    636     <xsl:apply-templates select="row[1]">
    637       <xsl:with-param name="spans">
    638         <xsl:call-template name="blank.spans">
    639           <xsl:with-param name="cols" select="../@cols"/>
    640         </xsl:call-template>
    641       </xsl:with-param>
    642     </xsl:apply-templates>
    643 
     705    <xsl:choose>
     706      <!-- Use recursion if @morerows is used -->
     707      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
     708        <xsl:apply-templates select="row[1]">
     709          <xsl:with-param name="spans">
     710            <xsl:call-template name="blank.spans">
     711              <xsl:with-param name="cols" select="../@cols"/>
     712            </xsl:call-template>
     713          </xsl:with-param>
     714          <xsl:with-param name="browserows" select="'recurse'"/>
     715        </xsl:apply-templates>
     716      </xsl:when>
     717      <xsl:otherwise>
     718        <xsl:apply-templates select="row">
     719          <xsl:with-param name="spans">
     720            <xsl:call-template name="blank.spans">
     721              <xsl:with-param name="cols" select="../@cols"/>
     722            </xsl:call-template>
     723          </xsl:with-param>
     724          <xsl:with-param name="browserows" select="'loop'" />
     725        </xsl:apply-templates>
     726      </xsl:otherwise>
     727    </xsl:choose>
    644728  </fo:table-footer>
    645729</xsl:template>
     
    649733
    650734  <fo:table-body start-indent="0pt" end-indent="0pt">
    651     <xsl:apply-templates select="row[1]">
    652       <xsl:with-param name="spans">
    653         <xsl:call-template name="blank.spans">
    654           <xsl:with-param name="cols" select="../@cols"/>
    655         </xsl:call-template>
    656       </xsl:with-param>
    657     </xsl:apply-templates>
     735    <xsl:choose>
     736      <!-- Use recursion if @morerows is used -->
     737      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
     738        <xsl:apply-templates select="row[1]">
     739          <xsl:with-param name="spans">
     740            <xsl:call-template name="blank.spans">
     741              <xsl:with-param name="cols" select="../@cols"/>
     742            </xsl:call-template>
     743          </xsl:with-param>
     744          <xsl:with-param name="browserows" select="'recurse'"/>
     745        </xsl:apply-templates>
     746      </xsl:when>
     747      <xsl:otherwise>
     748        <xsl:apply-templates select="row">
     749          <xsl:with-param name="spans">
     750            <xsl:call-template name="blank.spans">
     751              <xsl:with-param name="cols" select="../@cols"/>
     752            </xsl:call-template>
     753          </xsl:with-param>
     754          <xsl:with-param name="browserows" select="'loop'" />
     755        </xsl:apply-templates>
     756      </xsl:otherwise>
     757    </xsl:choose>
    658758  </fo:table-body>
    659759</xsl:template>
     
    661761<xsl:template match="row">
    662762  <xsl:param name="spans"/>
     763  <xsl:param name="browserows"/>
    663764
    664765  <xsl:choose>
     
    666767      <xsl:call-template name="normal-row">
    667768        <xsl:with-param name="spans" select="$spans"/>
     769        <xsl:with-param name="browserows" select="$browserows"/>
    668770      </xsl:call-template>
    669771    </xsl:when>
     
    689791      </fo:table-row>
    690792
    691       <xsl:apply-templates select="following-sibling::row[1]">
    692         <xsl:with-param name="spans">
    693           <xsl:call-template name="consume-row">
    694             <xsl:with-param name="spans" select="$spans"/>
    695           </xsl:call-template>
    696         </xsl:with-param>
    697       </xsl:apply-templates>
     793      <xsl:if test="$browserows = 'recurse'">
     794        <xsl:apply-templates select="following-sibling::row[1]">
     795          <xsl:with-param name="spans">
     796            <xsl:call-template name="consume-row">
     797              <xsl:with-param name="spans" select="$spans"/>
     798            </xsl:call-template>
     799          </xsl:with-param>
     800        </xsl:apply-templates>
     801      </xsl:if>
    698802    </xsl:otherwise>
    699803  </xsl:choose>
     
    702806<xsl:template name="normal-row">
    703807  <xsl:param name="spans"/>
     808  <xsl:param name="browserows"/>
    704809
    705810  <fo:table-row>
     
    712817  </fo:table-row>
    713818
    714   <xsl:if test="following-sibling::row">
    715     <xsl:variable name="nextspans">
    716       <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
    717         <xsl:with-param name="spans" select="$spans"/>
     819  <xsl:if test="$browserows = 'recurse'">
     820    <xsl:if test="following-sibling::row">
     821      <xsl:variable name="nextspans">
     822        <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
     823          <xsl:with-param name="spans" select="$spans"/>
     824        </xsl:apply-templates>
     825      </xsl:variable>
     826 
     827      <xsl:apply-templates select="following-sibling::row[1]">
     828        <xsl:with-param name="spans" select="$nextspans"/>
     829        <xsl:with-param name="browserows" select="$browserows"/>
    718830      </xsl:apply-templates>
    719     </xsl:variable>
    720 
    721     <xsl:apply-templates select="following-sibling::row[1]">
    722       <xsl:with-param name="spans" select="$nextspans"/>
    723     </xsl:apply-templates>
     831    </xsl:if>
    724832  </xsl:if>
    725833</xsl:template>
     
    727835<!-- customize this template to add row properties -->
    728836<xsl:template name="table.row.properties">
     837
     838  <xsl:variable name="row-height">
     839    <xsl:if test="processing-instruction('dbfo')">
     840      <xsl:call-template name="pi.dbfo_row-height"/>
     841    </xsl:if>
     842  </xsl:variable>
     843
     844  <xsl:if test="$row-height != ''">
     845    <xsl:attribute name="block-progression-dimension">
     846      <xsl:value-of select="$row-height"/>
     847    </xsl:attribute>
     848  </xsl:if>
     849
    729850  <xsl:variable name="bgcolor">
    730851    <xsl:call-template name="pi.dbfo_bgcolor"/>
    731852  </xsl:variable>
     853
    732854  <xsl:if test="$bgcolor != ''">
    733855    <xsl:attribute name="background-color">
     
    786908  <xsl:variable name="rowsep">
    787909    <xsl:choose>
    788       <!-- If this is the last row, rowsep never applies. -->
     910      <!-- If this is the last row, rowsep never applies (except when
     911           the ancestor tgroup has a following sibling tgroup) -->
    789912      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
    790913                          or ancestor-or-self::thead/following-sibling::tbody
    791                           or ancestor-or-self::tbody/preceding-sibling::tfoot)">
     914                          or ancestor-or-self::tbody/preceding-sibling::tfoot)
     915                          and not(ancestor::tgroup/following-sibling::tgroup)">
    792916        <xsl:value-of select="0"/>
    793917      </xsl:when>
     
    796920                       following-sibling::row) = @morerows )
    797921                      and not (ancestor-or-self::thead/following-sibling::tbody
    798                        or ancestor-or-self::tbody/preceding-sibling::tfoot)">
     922                       or ancestor-or-self::tbody/preceding-sibling::tfoot)
     923                       and not(ancestor::tgroup/following-sibling::tgroup)">
    799924        <xsl:value-of select="0"/>
    800925      </xsl:when>
     926
    801927      <xsl:otherwise>
    802928        <xsl:call-template name="inherited.table.attribute">
     
    10091135
    10101136        <xsl:choose>
    1011           <xsl:when test="$fop.extensions = 0 and $passivetex.extensions = 0
     1137          <xsl:when test="$fop.extensions = 0
    10121138                          and $orientation != ''">
    10131139            <fo:block-container reference-orientation="{$orientation}">
     
    10701196
    10711197      <xsl:if test="$colsep.inherit &gt; 0 and
    1072                       $col &lt; ancestor::tgroup/@cols">
     1198                      $col &lt; (ancestor::tgroup/@cols|ancestor::entrytbl/@cols)[last()]">
    10731199        <xsl:call-template name="border">
    1074           <xsl:with-param name="side" select="'right'"/>
     1200          <xsl:with-param name="side" select="'end'"/>
    10751201        </xsl:call-template>
    10761202      </xsl:if>
     
    11101236    <xsl:otherwise>
    11111237      <!-- HTML table -->
    1112       <xsl:variable name="border"
    1113                     select="(ancestor::table |
    1114                              ancestor::informaltable)[last()]/@border"/>
    1115       <xsl:if test="$border != '' and $border != 0">
    1116         <xsl:attribute name="border">
    1117           <xsl:value-of select="$table.cell.border.thickness"/>
    1118           <xsl:text> </xsl:text>
    1119           <xsl:value-of select="$table.cell.border.style"/>
    1120           <xsl:text> </xsl:text>
    1121           <xsl:value-of select="$table.cell.border.color"/>
     1238      <xsl:if test="$bgcolor.pi != ''">
     1239        <xsl:attribute name="background-color">
     1240          <xsl:value-of select="$bgcolor.pi"/>
    11221241        </xsl:attribute>
    11231242      </xsl:if>
     1243
     1244      <xsl:if test="$align.inherit != ''">
     1245        <xsl:attribute name="text-align">
     1246          <xsl:value-of select="$align.inherit"/>
     1247        </xsl:attribute>
     1248      </xsl:if>
     1249
     1250      <xsl:if test="$valign.inherit != ''">
     1251        <xsl:attribute name="display-align">
     1252          <xsl:choose>
     1253            <xsl:when test="$valign.inherit='top'">before</xsl:when>
     1254            <xsl:when test="$valign.inherit='middle'">center</xsl:when>
     1255            <xsl:when test="$valign.inherit='bottom'">after</xsl:when>
     1256            <xsl:otherwise>
     1257              <xsl:message>
     1258                <xsl:text>Unexpected valign value: </xsl:text>
     1259                <xsl:value-of select="$valign.inherit"/>
     1260                <xsl:text>, center used.</xsl:text>
     1261              </xsl:message>
     1262              <xsl:text>center</xsl:text>
     1263            </xsl:otherwise>
     1264          </xsl:choose>
     1265        </xsl:attribute>
     1266      </xsl:if>
     1267
     1268      <xsl:call-template name="html.table.cell.rules"/>
     1269
    11241270    </xsl:otherwise>
    11251271  </xsl:choose>
     
    11301276<xsl:template name="table.cell.block.properties">
    11311277  <!-- highlight this entry? -->
    1132   <xsl:if test="ancestor::thead or ancestor::tfoot">
    1133     <xsl:attribute name="font-weight">bold</xsl:attribute>
    1134   </xsl:if>
     1278  <xsl:choose>
     1279    <xsl:when test="ancestor::thead or ancestor::tfoot">
     1280      <xsl:attribute name="font-weight">bold</xsl:attribute>
     1281    </xsl:when>
     1282    <!-- Make row headers bold too -->
     1283    <xsl:when test="ancestor::tbody and
     1284                    (ancestor::table[@rowheader = 'firstcol'] or
     1285                    ancestor::informaltable[@rowheader = 'firstcol']) and
     1286                    ancestor-or-self::entry[1][count(preceding-sibling::entry) = 0]">
     1287      <xsl:attribute name="font-weight">bold</xsl:attribute>
     1288    </xsl:when>
     1289  </xsl:choose>
    11351290</xsl:template>
    11361291
     
    11721327      <xsl:text>0:</xsl:text>
    11731328      <xsl:call-template name="sentry">
    1174         <xsl:with-param name="col" select="$col+$entry.colspan"/>
    1175         <xsl:with-param name="spans" select="$following.spans"/>
     1329        <xsl:with-param name="col" select="$col + 1"/>
     1330        <xsl:with-param name="spans" select="substring-after($spans,':')"/>
    11761331      </xsl:call-template>
    11771332    </xsl:when>
     
    12731428      <xsl:variable name="colspec.colwidth">
    12741429        <xsl:choose>
     1430          <xsl:when test="normalize-space($colspec/@colwidth)='*'">1*</xsl:when>
    12751431          <xsl:when test="$colspec/@colwidth">
    12761432            <xsl:value-of select="$colspec/@colwidth"/>
     
    13231479          <xsl:call-template name="calc.column.width"/>
    13241480        </xsl:variable>
    1325         <xsl:if test="$colwidth != 'proportional-column-width(1)'">
    13261481          <xsl:attribute name="column-width">
    13271482            <xsl:value-of select="$colwidth"/>
    13281483          </xsl:attribute>
    1329         </xsl:if>
    13301484      </fo:table-column>
    13311485    </xsl:when>
     
    13631517              </xsl:call-template>
    13641518            </xsl:variable>
    1365             <xsl:if test="$colwidth != 'proportional-column-width(1)'">
    13661519              <xsl:attribute name="column-width">
    13671520                <xsl:value-of select="$colwidth"/>
    13681521              </xsl:attribute>
    1369             </xsl:if>
    13701522          </fo:table-column>
    13711523        </xsl:when>
     
    15311683</xsl:template>
    15321684
     1685<xsl:template match="table/caption">
     1686  <fo:block xsl:use-attribute-sets="table.caption.properties">
     1687    <xsl:apply-templates/>
     1688  </fo:block>
     1689</xsl:template>
     1690
    15331691<!-- ==================================================================== -->
    15341692
Note: See TracChangeset for help on using the changeset viewer.