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_empty-cells.xml 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 that tables with empty cells are handled correctly. There was a bug (#43766)
  21. which caused every break possibility of a row containing an empty cell to have a 900 penalty.
  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="page" page-height="6cm" page-width="15cm"
  28. margin-top="5mm" margin-bottom="5mm" margin-left="2cm" margin-right="2cm">
  29. <fo:region-body margin-top="5mm" margin-bottom="5mm"/>
  30. <fo:region-before extent="5mm" display-align="after"/>
  31. <fo:region-after extent="5mm"/>
  32. </fo:simple-page-master>
  33. </fo:layout-master-set>
  34. <fo:page-sequence master-reference="page" font-family="serif" font-size="12pt">
  35. <fo:static-content flow-name="xsl-region-before">
  36. <fo:block border-bottom="0.5pt solid black"/>
  37. </fo:static-content>
  38. <fo:static-content flow-name="xsl-region-after">
  39. <fo:block border-top="0.5pt solid black"/>
  40. </fo:static-content>
  41. <fo:flow flow-name="xsl-region-body">
  42. <fo:block space-after="60pt">Before the table</fo:block>
  43. <fo:table width="100%" table-layout="fixed"
  44. border-collapse="separate" border="1pt solid black">
  45. <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
  46. <fo:table-body>
  47. <fo:table-row>
  48. <fo:table-cell border="1pt solid black">
  49. <fo:block>Cell 1.1</fo:block>
  50. <fo:block>Cell 1.1</fo:block>
  51. <fo:block>Cell 1.1</fo:block>
  52. </fo:table-cell>
  53. <fo:table-cell border="1pt solid blue">
  54. <fo:block/>
  55. </fo:table-cell>
  56. </fo:table-row>
  57. <fo:table-row>
  58. <fo:table-cell border="1pt solid black"><fo:block>Cell 2.1</fo:block></fo:table-cell>
  59. <fo:table-cell border="1pt solid black"><fo:block>Cell 2.2</fo:block></fo:table-cell>
  60. </fo:table-row>
  61. <fo:table-row>
  62. <fo:table-cell border="1pt solid black"><fo:block>Cell 3.1</fo:block></fo:table-cell>
  63. <fo:table-cell border="1pt solid black"><fo:block>Cell 3.2</fo:block></fo:table-cell>
  64. </fo:table-row>
  65. <fo:table-row>
  66. <fo:table-cell border="1pt solid black"><fo:block>Cell 4.1</fo:block></fo:table-cell>
  67. <fo:table-cell border="1pt solid black"><fo:block>Cell 4.2</fo:block></fo:table-cell>
  68. </fo:table-row>
  69. <fo:table-row>
  70. <fo:table-cell border="1pt solid black"><fo:block>Cell 5.1</fo:block></fo:table-cell>
  71. <fo:table-cell border="1pt solid black"><fo:block>Cell 5.2</fo:block></fo:table-cell>
  72. </fo:table-row>
  73. <fo:table-row>
  74. <fo:table-cell border="1pt solid black"><fo:block>Cell 6.1</fo:block></fo:table-cell>
  75. <fo:table-cell border="1pt solid black"><fo:block>Cell 6.2</fo:block></fo:table-cell>
  76. </fo:table-row>
  77. </fo:table-body>
  78. </fo:table>
  79. </fo:flow>
  80. </fo:page-sequence>
  81. </fo:root>
  82. </fo>
  83. <checks>
  84. <!-- Two pages -->
  85. <eval expected="2" xpath="count(//pageViewport)"/>
  86. <element-list category="breaker">
  87. <skip>6</skip>
  88. <box w="15400"/>
  89. <penalty p="0" w="0"/>
  90. <box w="14400"/>
  91. <penalty p="0" w="0"/>
  92. <box w="15400"/>
  93. <penalty p="0" w="0"/>
  94. <box w="16400"/>
  95. <penalty p="0" w="0"/>
  96. <box w="16400"/>
  97. <penalty p="0" w="0"/>
  98. <box w="16400"/>
  99. <penalty p="0" w="0"/>
  100. <skip>10</skip>
  101. </element-list>
  102. </checks>
  103. </testcase>