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.

block_break-before_bug44412_2.xml 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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 for the correct behaviour of multiple breaks at the same break possibility.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="page" page-height="5in" page-width="5in" margin="20pt">
  27. <fo:region-body/>
  28. <fo:region-after extent="1.2em"/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="page" id="ps1" initial-page-number="1" force-page-count="no-force">
  32. <fo:static-content flow-name="xsl-region-after">
  33. <fo:block>page: <fo:page-number/></fo:block>
  34. </fo:static-content>
  35. <fo:flow flow-name="xsl-region-body">
  36. <fo:block id="b1">Before the break</fo:block>
  37. <fo:block break-before="page" break-after="column">
  38. <fo:block id="b2" break-before="page">
  39. This text should be on page 2.
  40. </fo:block>
  41. <fo:block>
  42. <fo:block id="b3" break-after="page">
  43. Inner block with break-after.
  44. </fo:block>
  45. </fo:block>
  46. </fo:block>
  47. <fo:block id="b4">This text should be on page 3.</fo:block>
  48. </fo:flow>
  49. </fo:page-sequence>
  50. <fo:page-sequence master-reference="page" id="ps2" initial-page-number="1" force-page-count="no-force">
  51. <fo:static-content flow-name="xsl-region-after">
  52. <fo:block>page: <fo:page-number/></fo:block>
  53. </fo:static-content>
  54. <fo:flow flow-name="xsl-region-body">
  55. <fo:block id="b11">Before the break</fo:block>
  56. <fo:block-container break-before="page" break-after="column">
  57. <fo:block-container break-before="page">
  58. <fo:block id="b12">This text should be on page 2.</fo:block>
  59. </fo:block-container>
  60. <fo:block>
  61. <fo:block id="b13" break-after="page">
  62. Inner block with break-after.
  63. </fo:block>
  64. </fo:block>
  65. </fo:block-container>
  66. <fo:block id="b14">This text should be on page 3.</fo:block>
  67. </fo:flow>
  68. </fo:page-sequence>
  69. <fo:page-sequence master-reference="page" id="ps3" initial-page-number="1" force-page-count="no-force">
  70. <fo:static-content flow-name="xsl-region-after">
  71. <fo:block>page: <fo:page-number/></fo:block>
  72. </fo:static-content>
  73. <fo:flow flow-name="xsl-region-body">
  74. <fo:block id="b21">Before the break</fo:block>
  75. <fo:block break-before="page" break-after="column">
  76. <fo:table table-layout="fixed" width="100%" break-before="page">
  77. <fo:table-column column-width="proportional-column-width(1)"/>
  78. <fo:table-body>
  79. <fo:table-row>
  80. <fo:table-cell>
  81. <fo:block id="b22">This text should be on page 2.</fo:block>
  82. </fo:table-cell>
  83. </fo:table-row>
  84. </fo:table-body>
  85. </fo:table>
  86. <fo:block>
  87. <fo:table table-layout="fixed" width="100%" break-after="page">
  88. <fo:table-column column-width="proportional-column-width(1)"/>
  89. <fo:table-body>
  90. <fo:table-row>
  91. <fo:table-cell>
  92. <fo:block id="b23">Inner block in table with break-after.</fo:block>
  93. </fo:table-cell>
  94. </fo:table-row>
  95. </fo:table-body>
  96. </fo:table>
  97. </fo:block>
  98. </fo:block>
  99. <fo:block id="b24">This text should be on page 3.</fo:block>
  100. </fo:flow>
  101. </fo:page-sequence>
  102. <fo:page-sequence master-reference="page" id="ps4" initial-page-number="1" force-page-count="no-force">
  103. <fo:static-content flow-name="xsl-region-after">
  104. <fo:block>page: <fo:page-number/></fo:block>
  105. </fo:static-content>
  106. <fo:flow flow-name="xsl-region-body">
  107. <fo:block id="b31">Before the break</fo:block>
  108. <fo:block break-before="page" break-after="column">
  109. <fo:list-block break-before="page">
  110. <fo:list-item>
  111. <fo:list-item-label end-indent="label-end()">
  112. <fo:block>+</fo:block>
  113. </fo:list-item-label>
  114. <fo:list-item-body start-indent="body-start()">
  115. <fo:block id="b32">This text should be on page 2.</fo:block>
  116. </fo:list-item-body>
  117. </fo:list-item>
  118. <fo:list-item break-after="page">
  119. <fo:list-item-label end-indent="label-end()">
  120. <fo:block>+</fo:block>
  121. </fo:list-item-label>
  122. <fo:list-item-body start-indent="body-start()">
  123. <fo:block id="b33">Inner block in list-item with break-after.</fo:block>
  124. </fo:list-item-body>
  125. </fo:list-item>
  126. </fo:list-block>
  127. </fo:block>
  128. <fo:block id="b34">This text should be on page 3.</fo:block>
  129. </fo:flow>
  130. </fo:page-sequence>
  131. </fo:root>
  132. </fo>
  133. <checks>
  134. <eval expected="1" xpath="//block[@prod-id = 'b1']/ancestor::pageViewport/@nr"/>
  135. <eval expected="2" xpath="//block[@prod-id = 'b2']/ancestor::pageViewport/@nr"/>
  136. <eval expected="2" xpath="//block[@prod-id = 'b3']/ancestor::pageViewport/@nr"/>
  137. <eval expected="3" xpath="//block[@prod-id = 'b4']/ancestor::pageViewport/@nr"/>
  138. <eval expected="1" xpath="//block[@prod-id = 'b11']/ancestor::pageViewport/@nr"/>
  139. <eval expected="2" xpath="//block[@prod-id = 'b12']/ancestor::pageViewport/@nr"/>
  140. <eval expected="2" xpath="//block[@prod-id = 'b13']/ancestor::pageViewport/@nr"/>
  141. <eval expected="3" xpath="//block[@prod-id = 'b14']/ancestor::pageViewport/@nr"/>
  142. <eval expected="1" xpath="//block[@prod-id = 'b21']/ancestor::pageViewport/@nr"/>
  143. <eval expected="2" xpath="//block[@prod-id = 'b22']/ancestor::pageViewport/@nr"/>
  144. <eval expected="2" xpath="//block[@prod-id = 'b23']/ancestor::pageViewport/@nr"/>
  145. <eval expected="3" xpath="//block[@prod-id = 'b24']/ancestor::pageViewport/@nr"/>
  146. </checks>
  147. </testcase>