Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

table-row_break-before_row-span.xml 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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-before on the first row of a table, when it contains row-spanning
  21. cells, works correctly.
  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" font-family="serif" font-size="14pt">
  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="separate" 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 break-before="page">
  39. <fo:table-cell border="2pt solid blue" number-rows-spanned="2">
  40. <fo:block>Cell 1.1</fo:block>
  41. </fo:table-cell>
  42. <fo:table-cell border="2pt solid teal">
  43. <fo:block>Cell 1.2</fo:block>
  44. </fo:table-cell>
  45. </fo:table-row>
  46. <fo:table-row>
  47. <fo:table-cell border="2pt solid olive">
  48. <fo:block>Cell 2.2</fo:block>
  49. </fo:table-cell>
  50. </fo:table-row>
  51. <fo:table-row>
  52. <fo:table-cell border="2pt solid red">
  53. <fo:block>Cell 3.1</fo:block>
  54. </fo:table-cell>
  55. <fo:table-cell border="2pt solid fuchsia">
  56. <fo:block>Cell 3.2</fo:block>
  57. </fo:table-cell>
  58. </fo:table-row>
  59. </fo:table-body>
  60. </fo:table>
  61. <fo:block>After the table</fo:block>
  62. </fo:flow>
  63. </fo:page-sequence>
  64. </fo:root>
  65. </fo>
  66. <checks>
  67. <!-- Two pages -->
  68. <eval expected="2" xpath="count(//pageViewport)"/>
  69. <!-- Only one line on the first page -->
  70. <eval expected="1" xpath="count(//pageViewport[@nr=1]//flow/block)"/>
  71. <eval expected="Before the table" xpath="//pageViewport[@nr=1]//flow/block[1]/lineArea/text[1]"/>
  72. <!-- Table plus line "After the table" on the second page -->
  73. <eval expected="2" xpath="count(//pageViewport[@nr=2]//flow/block)"/>
  74. <eval expected="After the table" xpath="//pageViewport[@nr=2]//flow/block[2]/lineArea/text[1]"/>
  75. </checks>
  76. </testcase>