You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

table_table-layout_fixed_3.xml 3.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <testcase>
  18. <info>
  19. <p>
  20. This test checks tables with table-layout="fixed" and when width is set but is less
  21. than the sum of all column widths.
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="20pt">
  28. <fo:region-body margin="0pt" background-color="lightgray"/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:table table-layout="fixed" width="100%" border-collapse="separate"
  34. border="solid 5pt red" border-separation.inline-progression-direction="10pt">
  35. <fo:table-column column-width="90pt"/>
  36. <fo:table-column column-width="90pt"/>
  37. <fo:table-column column-width="90pt"/>
  38. <fo:table-column column-width="60pt"/>
  39. <fo:table-body>
  40. <fo:table-row>
  41. <fo:table-cell border="solid 2.5pt">
  42. <fo:block>cell1</fo:block>
  43. </fo:table-cell>
  44. <fo:table-cell border="solid 2.5pt" background-color="yellow">
  45. <fo:block>cell2</fo:block>
  46. </fo:table-cell>
  47. <fo:table-cell border="solid 2.5pt">
  48. <fo:block>cell3</fo:block>
  49. </fo:table-cell>
  50. <fo:table-cell border="solid 2.5pt" background-color="yellow">
  51. <fo:block>cell4</fo:block>
  52. </fo:table-cell>
  53. </fo:table-row>
  54. <fo:table-row>
  55. <fo:table-cell background-color="orange">
  56. <fo:block>cell5</fo:block>
  57. </fo:table-cell>
  58. <fo:table-cell>
  59. <fo:block>cell6</fo:block>
  60. </fo:table-cell>
  61. <fo:table-cell background-color="orange">
  62. <fo:block>cell7</fo:block>
  63. </fo:table-cell>
  64. <fo:table-cell>
  65. <fo:block>cell8</fo:block>
  66. </fo:table-cell>
  67. </fo:table-row>
  68. </fo:table-body>
  69. </fo:table>
  70. </fo:flow>
  71. </fo:page-sequence>
  72. </fo:root>
  73. </fo>
  74. <checks>
  75. <eval expected="340000" xpath="//flow/block[1]/@ipda"/>
  76. <eval expected="330000" xpath="//flow/block[1]/@ipd"/>
  77. <eval expected="80000" xpath="//flow/block[1]/block[1]/@ipda"/>
  78. <eval expected="7500" xpath="//flow/block[1]/block[1]/@left-offset"/>
  79. <eval expected="80000" xpath="//flow/block[1]/block[2]/@ipda"/>
  80. <eval expected="97500" xpath="//flow/block[1]/block[2]/@left-offset"/>
  81. <eval expected="80000" xpath="//flow/block[1]/block[3]/@ipda"/>
  82. <eval expected="187500" xpath="//flow/block[1]/block[3]/@left-offset"/>
  83. <eval expected="50000" xpath="//flow/block[1]/block[4]/@ipda"/>
  84. <eval expected="277500" xpath="//flow/block[1]/block[4]/@left-offset"/>
  85. </checks>
  86. </testcase>