您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

flow_changing-ipd_4.xml 10.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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 non-restartable elements still show up at IPD change, even if not
  21. re-laid out.
  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="narrow"
  28. page-height="300pt" page-width="400pt" margin="50pt">
  29. <fo:region-body background-color="#F0F0F0"/>
  30. </fo:simple-page-master>
  31. <fo:simple-page-master master-name="wide"
  32. page-height="300pt" page-width="600pt" margin="50pt">
  33. <fo:region-body background-color="#F0F0F0"/>
  34. </fo:simple-page-master>
  35. <fo:page-sequence-master master-name="pages">
  36. <fo:single-page-master-reference master-reference="narrow"/>
  37. <fo:repeatable-page-master-reference master-reference="wide"/>
  38. </fo:page-sequence-master>
  39. </fo:layout-master-set>
  40. <fo:page-sequence master-reference="pages">
  41. <fo:flow flow-name="xsl-region-body" text-align="justify">
  42. <fo:block space-before="10pt" id="b1_1">In olden times when wishing still helped one, there
  43. lived a king whose daughters were all beautiful, but the youngest was so beautiful that
  44. the sun itself, which has seen so much, was astonished whenever it shone in her
  45. face.</fo:block>
  46. <fo:block space-before="10pt" id="b1_2">In olden times when wishing still helped one, there
  47. lived a king whose daughters were all beautiful, but the youngest was so beautiful that
  48. the sun itself, which has seen so much, was astonished whenever it shone in her
  49. face.</fo:block>
  50. <fo:table table-layout="fixed" width="100%" border="1pt solid black" space-before="10pt"
  51. padding="2pt" border-collapse="separate">
  52. <fo:table-body>
  53. <fo:table-row>
  54. <fo:table-cell>
  55. <fo:block space-before="10pt" id="b1_3">In olden times when wishing still helped
  56. one, there lived a king whose daughters were all beautiful, but the youngest was
  57. so beautiful that the sun itself, which has seen so much, was astonished
  58. whenever it shone in her face.</fo:block>
  59. <fo:block space-before="10pt" id="b1_4">In olden times when wishing still helped
  60. one, there lived a king whose daughters were all beautiful, but the youngest was
  61. so beautiful that the sun itself, which has seen so much, was astonished
  62. whenever it shone in her face.</fo:block>
  63. </fo:table-cell>
  64. </fo:table-row>
  65. </fo:table-body>
  66. </fo:table>
  67. <fo:block space-before="10pt" id="b1_5" border-top="1pt solid red">In olden times when
  68. wishing still helped one, there lived a king whose daughters were all beautiful, but the
  69. youngest was so beautiful that the sun itself, which has seen so much, was astonished
  70. whenever it shone in her face.</fo:block>
  71. <fo:block space-before="10pt" id="b1_6">In olden times when wishing still helped one, there
  72. lived a king whose daughters were all beautiful, but the youngest was so beautiful that
  73. the sun itself, which has seen so much, was astonished whenever it shone in her
  74. face.</fo:block>
  75. </fo:flow>
  76. </fo:page-sequence>
  77. <fo:page-sequence master-reference="pages">
  78. <fo:flow flow-name="xsl-region-body" text-align="justify">
  79. <fo:block space-before="10pt" id="b2_1">In olden times when wishing still helped one, there
  80. lived a king whose daughters were all beautiful, but the youngest was so beautiful that
  81. the sun itself, which has seen so much, was astonished whenever it shone in her
  82. face.</fo:block>
  83. <fo:block space-before="10pt" id="b2_2">In olden times when wishing still helped one, there
  84. lived a king whose daughters were all beautiful, but the youngest was so beautiful that
  85. the sun itself, which has seen so much, was astonished whenever it shone in her
  86. face.</fo:block>
  87. <fo:list-block space-before="10pt" provisional-distance-between-starts="0.5cm">
  88. <fo:list-item>
  89. <fo:list-item-label end-indent="label-end()">
  90. <fo:block start-indent="2pt">•</fo:block>
  91. </fo:list-item-label>
  92. <fo:list-item-body start-indent="body-start()">
  93. <fo:block space-before="10pt" id="b2_3">In olden times when wishing still helped
  94. one, there lived a king whose daughters were all beautiful, but the youngest was
  95. so beautiful that the sun itself, which has seen so much, was
  96. astonished…</fo:block>
  97. </fo:list-item-body>
  98. </fo:list-item>
  99. <fo:list-item>
  100. <fo:list-item-label end-indent="label-end()">
  101. <fo:block start-indent="2pt">•</fo:block>
  102. </fo:list-item-label>
  103. <fo:list-item-body start-indent="body-start()">
  104. <fo:block id="b2_4">In olden times when wishing still helped one, there lived a king
  105. whose daughters were all beautiful, but the youngest was so beautiful that the sun
  106. itself, which has seen so much, was astonished…</fo:block>
  107. </fo:list-item-body>
  108. </fo:list-item>
  109. </fo:list-block>
  110. <fo:block space-before="10pt" space-before.conditionality="retain" border-top="1pt solid
  111. red" id="b2_5">In olden times when wishing still helped one, there lived a king whose
  112. daughters were all beautiful, but the youngest was so beautiful that the sun itself,
  113. which has seen so much, was astonished whenever it shone in her face.</fo:block>
  114. <fo:block space-before="10pt" id="b2_6">In olden times when wishing still helped one, there
  115. lived a king whose daughters were all beautiful, but the youngest was so beautiful that
  116. the sun itself, which has seen so much, was astonished whenever it shone in her
  117. face.</fo:block>
  118. </fo:flow>
  119. </fo:page-sequence>
  120. </fo:root>
  121. </fo>
  122. <checks>
  123. <!-- First page sequence – table -->
  124. <eval expected="(solid,#000000,1000)"
  125. xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]/@border-after"/>
  126. <eval expected="300000" xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[1]/@ipd"/>
  127. <eval expected="b1_4" xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]/block/block/@prod-id"/>
  128. <eval expected="In" xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[1]/text/word[1]"/>
  129. <eval expected="olden" xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[1]/text/word[2]"/>
  130. <eval expected="her" xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[4]/text/word[position()=last()-1]"/>
  131. <eval expected="face." xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//lineArea[4]/text/word[position()=last()]"/>
  132. <eval expected="b1_5" xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]/@prod-id"/>
  133. <eval expected="500000" xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]/@ipd"/>
  134. <eval expected="(solid,#ff0000,1000)"
  135. xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]/@border-before"/>
  136. <eval expected="In" xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]//lineArea[1]/text/word[1]"/>
  137. <eval expected="olden" xpath="//pageSequence[1]/pageViewport[2]//flow/block[2]//lineArea[1]/text/word[2]"/>
  138. <!-- Second page sequence – list -->
  139. <eval expected="300000" xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/@ipd"/>
  140. <eval expected="b2_4" xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/@prod-id"/>
  141. <eval expected="In" xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[1]/text/word[1]"/>
  142. <eval expected="olden" xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[1]/text/word[2]"/>
  143. <eval expected="was" xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[4]/text/word[position()=last()-1]"/>
  144. <eval expected="astonished…"
  145. xpath="//pageSequence[2]/pageViewport[2]//flow/block[1]/block/block[2]/block/lineArea[4]/text/word[position()=last()]"/>
  146. <eval expected="b2_5" xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]/@prod-id"/>
  147. <eval expected="500000" xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]/@ipd"/>
  148. <eval expected="10000" xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]/@space-before"/>
  149. <eval expected="(solid,#ff0000,1000)"
  150. xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]/@border-before"/>
  151. <eval expected="In" xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]//lineArea[1]/text/word[1]"/>
  152. <eval expected="olden" xpath="//pageSequence[2]/pageViewport[2]//flow/block[2]//lineArea[1]/text/word[2]"/>
  153. </checks>
  154. </testcase>