Changeset b1a51ac1 for stylesheets/lfs-xsl/docbook-xsl-1.78.1/fo/table.xsl
- Timestamp:
- 12/10/2013 11:37:38 PM (11 years ago)
- Branches:
- 7.5-systemd, 7.6-systemd, 7.7-systemd, 7.8-systemd, 7.9-systemd
- Children:
- 112db9d
- Parents:
- f2a5108
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/lfs-xsl/docbook-xsl-1.78.1/fo/table.xsl
rf2a5108 rb1a51ac1 14 14 15 15 <!-- ******************************************************************** 16 $Id $16 $Id: table.xsl 9666 2012-11-14 04:42:56Z bobstayton $ 17 17 ******************************************************************** 18 18 … … 28 28 <title>Formatting Object Table Reference</title> 29 29 <releaseinfo role="meta"> 30 $Id $30 $Id: table.xsl 9666 2012-11-14 04:42:56Z bobstayton $ 31 31 </releaseinfo> 32 32 </info> … … 98 98 <xsl:apply-templates select="."/> 99 99 </fo:table> 100 101 <xsl:for-each select="mediaobject|graphic"> 102 <xsl:apply-templates select="."/> 103 </xsl:for-each> 104 100 105 </xsl:for-each> 106 107 <xsl:apply-templates select="caption"/> 108 101 109 </xsl:template> 102 110 … … 136 144 </xsl:variable> 137 145 146 <xsl:variable name="keep.together"> 147 <xsl:call-template name="pi.dbfo_keep-together"/> 148 </xsl:variable> 149 138 150 <xsl:choose> 139 151 <xsl:when test="self::table"> 140 152 <fo:block id="{$id}" 141 153 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> 142 159 <xsl:if test="$placement = 'before'"> 143 160 <xsl:call-template name="formal.object.heading"> … … 157 174 <fo:block id="{$id}" 158 175 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> 159 181 <xsl:copy-of select="$table.layout"/> 160 182 <xsl:call-template name="table.footnote.block"/> … … 181 203 <xsl:choose> 182 204 <xsl:when test="@orient='land' and 183 $fop.extensions = 0 and 184 $passivetex.extensions = 0" > 205 $fop.extensions = 0" > 185 206 <fo:block-container reference-orientation="90" 186 207 padding="6pt" … … 212 233 <xsl:variable name="rowsep"> 213 234 <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) --> 215 237 <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row 216 238 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)"> 218 241 <xsl:value-of select="0"/> 219 242 </xsl:when> … … 259 282 <xsl:if test="$colsep > 0 and number($colnum) < ancestor::tgroup/@cols"> 260 283 <xsl:call-template name="border"> 261 <xsl:with-param name="side" select="' right'"/>284 <xsl:with-param name="side" select="'end'"/> 262 285 </xsl:call-template> 263 286 </xsl:if> … … 270 293 <!-- ==================================================================== --> 271 294 <xsl:template name="table.frame"> 272 <xsl: variablename="frame">295 <xsl:param name="frame"> 273 296 <xsl:choose> 274 297 <xsl:when test="../@frame"> … … 280 303 <xsl:otherwise>all</xsl:otherwise> 281 304 </xsl:choose> 282 </xsl:variable> 305 </xsl:param> 306 283 307 284 308 <xsl:choose> 285 309 <xsl:when test="$frame='all'"> 286 <xsl:attribute name="border- left-style">310 <xsl:attribute name="border-start-style"> 287 311 <xsl:value-of select="$table.frame.border.style"/> 288 312 </xsl:attribute> 289 <xsl:attribute name="border- right-style">313 <xsl:attribute name="border-end-style"> 290 314 <xsl:value-of select="$table.frame.border.style"/> 291 315 </xsl:attribute> … … 296 320 <xsl:value-of select="$table.frame.border.style"/> 297 321 </xsl:attribute> 298 <xsl:attribute name="border- left-width">322 <xsl:attribute name="border-start-width"> 299 323 <xsl:value-of select="$table.frame.border.thickness"/> 300 324 </xsl:attribute> 301 <xsl:attribute name="border- right-width">325 <xsl:attribute name="border-end-width"> 302 326 <xsl:value-of select="$table.frame.border.thickness"/> 303 327 </xsl:attribute> … … 308 332 <xsl:value-of select="$table.frame.border.thickness"/> 309 333 </xsl:attribute> 310 <xsl:attribute name="border- left-color">334 <xsl:attribute name="border-start-color"> 311 335 <xsl:value-of select="$table.frame.border.color"/> 312 336 </xsl:attribute> 313 <xsl:attribute name="border- right-color">337 <xsl:attribute name="border-end-color"> 314 338 <xsl:value-of select="$table.frame.border.color"/> 315 339 </xsl:attribute> … … 322 346 </xsl:when> 323 347 <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> 326 350 <xsl:attribute name="border-top-style">none</xsl:attribute> 327 351 <xsl:attribute name="border-bottom-style"> … … 336 360 </xsl:when> 337 361 <xsl:when test="$frame='sides'"> 338 <xsl:attribute name="border- left-style">362 <xsl:attribute name="border-start-style"> 339 363 <xsl:value-of select="$table.frame.border.style"/> 340 364 </xsl:attribute> 341 <xsl:attribute name="border- right-style">365 <xsl:attribute name="border-end-style"> 342 366 <xsl:value-of select="$table.frame.border.style"/> 343 367 </xsl:attribute> 344 368 <xsl:attribute name="border-top-style">none</xsl:attribute> 345 369 <xsl:attribute name="border-bottom-style">none</xsl:attribute> 346 <xsl:attribute name="border- left-width">370 <xsl:attribute name="border-start-width"> 347 371 <xsl:value-of select="$table.frame.border.thickness"/> 348 372 </xsl:attribute> 349 <xsl:attribute name="border- right-width">373 <xsl:attribute name="border-end-width"> 350 374 <xsl:value-of select="$table.frame.border.thickness"/> 351 375 </xsl:attribute> 352 <xsl:attribute name="border- left-color">376 <xsl:attribute name="border-start-color"> 353 377 <xsl:value-of select="$table.frame.border.color"/> 354 378 </xsl:attribute> 355 <xsl:attribute name="border- right-color">379 <xsl:attribute name="border-end-color"> 356 380 <xsl:value-of select="$table.frame.border.color"/> 357 381 </xsl:attribute> 358 382 </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> 359 411 <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> 362 414 <xsl:attribute name="border-top-style"> 363 415 <xsl:value-of select="$table.frame.border.style"/> … … 372 424 </xsl:when> 373 425 <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> 376 428 <xsl:attribute name="border-top-style"> 377 429 <xsl:value-of select="$table.frame.border.style"/> … … 394 446 </xsl:when> 395 447 <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> 398 450 <xsl:attribute name="border-top-style">none</xsl:attribute> 399 451 <xsl:attribute name="border-bottom-style">none</xsl:attribute> … … 404 456 <xsl:value-of select="$frame"/> 405 457 </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> 408 460 <xsl:attribute name="border-top-style">none</xsl:attribute> 409 461 <xsl:attribute name="border-bottom-style">none</xsl:attribute> … … 415 467 416 468 <xsl:template name="border"> 417 <xsl:param name="side" select="' left'"/>469 <xsl:param name="side" select="'start'"/> 418 470 419 471 <xsl:attribute name="border-{$side}-width"> … … 461 513 <xsl:if test="count($prop-columns) != 0 or 462 514 $fop.extensions != 0 or 463 $fop1.extensions != 0 or 464 $passivetex.extensions != 0"> 515 $fop1.extensions != 0"> 465 516 <xsl:attribute name="table-layout">fixed</xsl:attribute> 466 517 </xsl:if> … … 535 586 <xsl:choose> 536 587 <!-- 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> 552 606 </xsl:when> 553 607 <xsl:otherwise> … … 592 646 <!-- These processors don't support table-layout="auto" --> 593 647 <xsl:when test="$fop.extensions != 0 or 594 $fop1.extensions != 0 or 595 $passivetex.extensions != 0"> 648 $fop1.extensions != 0"> 596 649 <xsl:text>100%</xsl:text> 597 650 </xsl:when> … … 620 673 621 674 <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> 629 698 </fo:table-header> 630 699 </xsl:template> … … 634 703 635 704 <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> 644 728 </fo:table-footer> 645 729 </xsl:template> … … 649 733 650 734 <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> 658 758 </fo:table-body> 659 759 </xsl:template> … … 661 761 <xsl:template match="row"> 662 762 <xsl:param name="spans"/> 763 <xsl:param name="browserows"/> 663 764 664 765 <xsl:choose> … … 666 767 <xsl:call-template name="normal-row"> 667 768 <xsl:with-param name="spans" select="$spans"/> 769 <xsl:with-param name="browserows" select="$browserows"/> 668 770 </xsl:call-template> 669 771 </xsl:when> … … 689 791 </fo:table-row> 690 792 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> 698 802 </xsl:otherwise> 699 803 </xsl:choose> … … 702 806 <xsl:template name="normal-row"> 703 807 <xsl:param name="spans"/> 808 <xsl:param name="browserows"/> 704 809 705 810 <fo:table-row> … … 712 817 </fo:table-row> 713 818 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"/> 718 830 </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> 724 832 </xsl:if> 725 833 </xsl:template> … … 727 835 <!-- customize this template to add row properties --> 728 836 <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 729 850 <xsl:variable name="bgcolor"> 730 851 <xsl:call-template name="pi.dbfo_bgcolor"/> 731 852 </xsl:variable> 853 732 854 <xsl:if test="$bgcolor != ''"> 733 855 <xsl:attribute name="background-color"> … … 786 908 <xsl:variable name="rowsep"> 787 909 <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) --> 789 912 <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row 790 913 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)"> 792 916 <xsl:value-of select="0"/> 793 917 </xsl:when> … … 796 920 following-sibling::row) = @morerows ) 797 921 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)"> 799 924 <xsl:value-of select="0"/> 800 925 </xsl:when> 926 801 927 <xsl:otherwise> 802 928 <xsl:call-template name="inherited.table.attribute"> … … 1009 1135 1010 1136 <xsl:choose> 1011 <xsl:when test="$fop.extensions = 0 and $passivetex.extensions = 01137 <xsl:when test="$fop.extensions = 0 1012 1138 and $orientation != ''"> 1013 1139 <fo:block-container reference-orientation="{$orientation}"> … … 1070 1196 1071 1197 <xsl:if test="$colsep.inherit > 0 and 1072 $col < ancestor::tgroup/@cols">1198 $col < (ancestor::tgroup/@cols|ancestor::entrytbl/@cols)[last()]"> 1073 1199 <xsl:call-template name="border"> 1074 <xsl:with-param name="side" select="' right'"/>1200 <xsl:with-param name="side" select="'end'"/> 1075 1201 </xsl:call-template> 1076 1202 </xsl:if> … … 1110 1236 <xsl:otherwise> 1111 1237 <!-- 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"/> 1122 1241 </xsl:attribute> 1123 1242 </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 1124 1270 </xsl:otherwise> 1125 1271 </xsl:choose> … … 1130 1276 <xsl:template name="table.cell.block.properties"> 1131 1277 <!-- 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> 1135 1290 </xsl:template> 1136 1291 … … 1172 1327 <xsl:text>0:</xsl:text> 1173 1328 <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,':')"/> 1176 1331 </xsl:call-template> 1177 1332 </xsl:when> … … 1273 1428 <xsl:variable name="colspec.colwidth"> 1274 1429 <xsl:choose> 1430 <xsl:when test="normalize-space($colspec/@colwidth)='*'">1*</xsl:when> 1275 1431 <xsl:when test="$colspec/@colwidth"> 1276 1432 <xsl:value-of select="$colspec/@colwidth"/> … … 1323 1479 <xsl:call-template name="calc.column.width"/> 1324 1480 </xsl:variable> 1325 <xsl:if test="$colwidth != 'proportional-column-width(1)'">1326 1481 <xsl:attribute name="column-width"> 1327 1482 <xsl:value-of select="$colwidth"/> 1328 1483 </xsl:attribute> 1329 </xsl:if>1330 1484 </fo:table-column> 1331 1485 </xsl:when> … … 1363 1517 </xsl:call-template> 1364 1518 </xsl:variable> 1365 <xsl:if test="$colwidth != 'proportional-column-width(1)'">1366 1519 <xsl:attribute name="column-width"> 1367 1520 <xsl:value-of select="$colwidth"/> 1368 1521 </xsl:attribute> 1369 </xsl:if>1370 1522 </fo:table-column> 1371 1523 </xsl:when> … … 1531 1683 </xsl:template> 1532 1684 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 1533 1691 <!-- ==================================================================== --> 1534 1692
Note:
See TracChangeset
for help on using the changeset viewer.