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-cell_break-after_last-block.xml 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 break-after on the last block child of a cell in the last row of a table
  21. without headers nor footers works properly.
  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="10cm" page-width="15cm"
  28. margin-top="1cm" margin-bottom="0" margin-left="1cm" margin-right="1cm">
  29. <fo:region-body/>
  30. </fo:simple-page-master>
  31. </fo:layout-master-set>
  32. <fo:page-sequence master-reference="page">
  33. <fo:flow flow-name="xsl-region-body">
  34. <fo:block>Before the table</fo:block>
  35. <fo:table width="100%" table-layout="fixed" border-collapse="collapse" border="4pt solid black">
  36. <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
  37. <fo:table-body>
  38. <fo:table-row>
  39. <fo:table-cell border="2pt solid black">
  40. <fo:block>Cell 1.1</fo:block>
  41. </fo:table-cell>
  42. <fo:table-cell border="2pt solid black">
  43. <fo:block>Cell 1.2 Line 1</fo:block>
  44. <fo:block break-after="page">Cell 1.2 Line 2</fo:block>
  45. </fo:table-cell>
  46. </fo:table-row>
  47. </fo:table-body>
  48. </fo:table>
  49. <fo:block>After the table</fo:block>
  50. </fo:flow>
  51. </fo:page-sequence>
  52. </fo:root>
  53. </fo>
  54. <checks>
  55. <!-- Two pages -->
  56. <eval expected="2" xpath="count(//pageViewport)"/>
  57. <!-- Line "Before the table" + table on the first page -->
  58. <eval expected="2" xpath="count(//pageViewport[@nr=1]//flow/block)"/>
  59. <eval expected="Before the table" xpath="//pageViewport[@nr=1]//flow/block[1]/lineArea/text[1]"/>
  60. <!-- Line "After the table" on the second page -->
  61. <eval expected="1" xpath="count(//pageViewport[@nr=2]//flow/block)"/>
  62. <eval expected="After the table" xpath="//pageViewport[@nr=2]//flow/block[1]/lineArea/text[1]"/>
  63. </checks>
  64. </testcase>