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-stepper_colspan_border-before.xml 3.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 TableStepper computes steps correctly in the following condition:
  21. collapsing borders, a cell spanning over two columns, the border-before on the grid unit of
  22. the second column bigger than on the first column.
  23. </p>
  24. </info>
  25. <fo>
  26. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  27. <fo:layout-master-set>
  28. <fo:simple-page-master master-name="page" page-height="7cm" page-width="15cm" margin="1cm"
  29. margin-bottom="0">
  30. <fo:region-body/>
  31. </fo:simple-page-master>
  32. </fo:layout-master-set>
  33. <fo:page-sequence master-reference="page" font-family="serif" font-size="14pt">
  34. <fo:flow flow-name="xsl-region-body">
  35. <fo:block space-after="80pt">Before the table</fo:block>
  36. <fo:table width="100%" table-layout="fixed" border="4pt solid black">
  37. <fo:table-column number-columns-repeated="3"
  38. column-width="proportional-column-width(1)"/>
  39. <fo:table-body>
  40. <fo:table-row>
  41. <fo:table-cell border="2pt solid blue">
  42. <fo:block>Cell 1.1</fo:block>
  43. </fo:table-cell>
  44. <fo:table-cell border="2pt solid blue">
  45. <fo:block>Cell 1.2</fo:block>
  46. </fo:table-cell>
  47. <fo:table-cell border="2pt solid teal" border-bottom-width="40pt">
  48. <!-- This big border-bottom prevents the second row of the table from fitting on
  49. the first page -->
  50. <fo:block>Cell 1.3</fo:block>
  51. </fo:table-cell>
  52. </fo:table-row>
  53. <fo:table-row>
  54. <fo:table-cell border="2pt solid blue">
  55. <fo:block>Cell 2.1</fo:block>
  56. <fo:block>Cell 2.1</fo:block>
  57. </fo:table-cell>
  58. <fo:table-cell border="2pt solid blue" number-columns-spanned="2">
  59. <fo:block>Cell 2.2</fo:block>
  60. <fo:block>Cell 2.2</fo:block>
  61. </fo:table-cell>
  62. </fo:table-row>
  63. </fo:table-body>
  64. </fo:table>
  65. <fo:block space-before="0pt">After the table</fo:block>
  66. </fo:flow>
  67. </fo:page-sequence>
  68. </fo:root>
  69. </fo>
  70. <checks>
  71. <!-- 2 pages -->
  72. <eval expected="2" xpath="count(//pageViewport)"/>
  73. <!-- 2 blocks on the first page: "Before the table" plus the table itself -->
  74. <eval expected="2" xpath="count(//pageViewport[1]//flow/block)"/>
  75. <!-- 3 blocks in the table, corresponding to the first row -->
  76. <eval expected="3" xpath="count(//pageViewport[1]//flow/block[2]/block)"/>
  77. <eval expected="2" xpath="count(//pageViewport[2]//flow/block)"/>
  78. <!-- the rest of the table on the second page -->
  79. <eval expected="4" xpath="count(//pageViewport[2]//flow/block[1]/block)"/>
  80. </checks>
  81. </testcase>