Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

table-cell_block_break-after.xml 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 breaks on tables: breaks inside table-cell content. It ensures that breaks
  21. are taken into account only once.
  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="8cm" page-width="15cm"
  28. margin-top="1cm" margin-bottom="1cm" 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:table width="150pt" table-layout="fixed"
  35. border-collapse="separate" border="2pt 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="4pt solid black">
  40. <fo:block>Cell 1</fo:block>
  41. <fo:block>Cell 1</fo:block>
  42. <fo:block>Cell 1</fo:block>
  43. </fo:table-cell>
  44. <fo:table-cell border="6pt solid black">
  45. <fo:block>Cell 2.1</fo:block>
  46. <fo:block keep-together="always" background-color="yellow">
  47. <fo:block>Cell 2.2.1</fo:block>
  48. <fo:block>Cell 2.2.2</fo:block>
  49. <fo:block break-after="page">Cell 2.2.3</fo:block>
  50. </fo:block>
  51. <fo:block>Cell 2.3</fo:block>
  52. </fo:table-cell>
  53. </fo:table-row>
  54. </fo:table-body>
  55. </fo:table>
  56. </fo:flow>
  57. </fo:page-sequence>
  58. </fo:root>
  59. </fo>
  60. <checks>
  61. <eval expected="2" xpath="count(//pageViewport)"/>
  62. <!-- page 1 -->
  63. <!-- 3 blocks in the first cell -->
  64. <eval expected="3" xpath="count(//pageViewport[@nr=1]//flow/block[1]/block[1]/block)"/>
  65. <eval expected="67000" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@ipd"/>
  66. <eval expected="75000" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@ipda"/>
  67. <eval expected="69200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@bpd"/>
  68. <eval expected="73200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@bpda"/>
  69. <!-- 2 blocks in the second cell -->
  70. <eval expected="2" xpath="count(//pageViewport[@nr=1]//flow/block[1]/block[2]/block)"/>
  71. <eval expected="63000" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@ipd"/>
  72. <eval expected="75000" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@ipda"/>
  73. <eval expected="67200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@bpd"/>
  74. <eval expected="73200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@bpda"/>
  75. <!-- 3 lines in the second block of the second cell -->
  76. <eval expected="3" xpath="count(//pageViewport[@nr=1]//flow/block[1]/block[2]/block[2]//lineArea)"/>
  77. <!-- page 2 -->
  78. <!-- Nothing in the first cell -->
  79. <eval expected="0" xpath="count(//pageViewport[@nr=2]//flow/block[1]/block[1]/block)"/>
  80. <eval expected="67000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@ipd"/>
  81. <eval expected="75000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@ipda"/>
  82. <eval expected="18800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@bpd"/>
  83. <eval expected="22800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@bpda"/>
  84. <!-- One block expected in the second cell -->
  85. <eval expected="1" xpath="count(//pageViewport[@nr=2]//flow/block[1]/block[2]/block)"/>
  86. <!-- One line in the block -->
  87. <eval expected="1" xpath="count(//pageViewport[@nr=2]//flow/block[1]/block[2]/block[1]//lineArea)"/>
  88. <eval expected="63000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@ipd"/>
  89. <eval expected="75000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@ipda"/>
  90. <eval expected="16800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@bpd"/>
  91. <eval expected="22800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@bpda"/>
  92. </checks>
  93. </testcase>