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

flow_changing-ipd_1.xml 5.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 blocks of texts are re-laid out after a change of the flow ipd.
  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="narrow"
  27. page-height="300pt" page-width="400pt" margin="50pt">
  28. <fo:region-body background-color="#F0F0F0"/>
  29. </fo:simple-page-master>
  30. <fo:simple-page-master master-name="wide"
  31. page-height="300pt" page-width="600pt" margin="50pt">
  32. <fo:region-body background-color="#F0F0F0"/>
  33. </fo:simple-page-master>
  34. <fo:page-sequence-master master-name="pages">
  35. <fo:single-page-master-reference master-reference="narrow"/>
  36. <fo:repeatable-page-master-reference master-reference="wide"/>
  37. </fo:page-sequence-master>
  38. </fo:layout-master-set>
  39. <fo:page-sequence master-reference="pages">
  40. <fo:flow flow-name="xsl-region-body" language="en" hyphenate="true">
  41. <fo:block text-align="justify" id="surrounding"
  42. space-before.minimum="10pt"
  43. space-before.optimum="12pt"
  44. space-before.maximum="50pt">
  45. <fo:block space-before="inherit" id="b1">In olden times when wishing still helped one,
  46. there lived a king whose daughters were all beautiful, but the youngest was so
  47. beautiful that the sun itself, which has seen so much, was astonished whenever it
  48. shone in her face.</fo:block>
  49. <fo:block space-before="inherit" id="b2">In olden times when wishing still helped one,
  50. there lived a king whose daughters were all beautiful, but the youngest was so
  51. beautiful that the sun itself, which has seen so much, was astonished whenever it
  52. shone in her face.</fo:block>
  53. <fo:block space-before="inherit" id="b3" border-top="1pt solid black"
  54. border-before-width.conditionality="retain">In olden times when wishing still helped
  55. one, there lived a king whose daughters were all beautiful, but the youngest was so
  56. beautiful that the sun itself, which has seen so much, was astonished whenever it
  57. shone in her face. In olden times when wishing still helped one, there lived a king
  58. whose daughters were all beautiful, but the youngest was so beautiful that the sun
  59. itself, which has seen so much, was astonished whenever it shone in her
  60. face.</fo:block>
  61. <fo:block space-before="inherit" id="b4" border-top="1pt solid black">In olden times
  62. when wishing still helped one, there lived a king whose daughters were all beautiful,
  63. but the youngest was so beautiful that the sun itself, which has seen so much, was
  64. astonished whenever it shone in her face.</fo:block>
  65. <fo:block space-before="inherit" id="b5">In olden times when wishing still helped one,
  66. there lived a king whose daughters were all beautiful, but the youngest was so
  67. beautiful that the sun itself, which has seen so much, was astonished whenever it
  68. shone in her face.</fo:block>
  69. </fo:block>
  70. </fo:flow>
  71. </fo:page-sequence>
  72. </fo:root>
  73. </fo>
  74. <checks>
  75. <eval expected="13100" xpath="//pageViewport[1]//flow/block/block[2]/@space-before"/>
  76. <eval expected="13100" xpath="//pageViewport[1]//flow/block/block[3]/@space-before"/>
  77. <eval expected="(solid,#000000,1000)"
  78. xpath="//pageViewport[1]//flow/block/block[3]/@border-before"/>
  79. <eval expected="In" xpath="//pageViewport[1]//flow/block/block[3]/lineArea[4]/text/word[position()=last()]"/>
  80. <eval expected="500000" xpath="//pageViewport[2]//flow/block/@ipd"/>
  81. <eval expected="(solid,#000000,1000)"
  82. xpath="//pageViewport[2]//flow/block/block[1]/@border-before"/>
  83. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block[1]/@ipd"/>
  84. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block[1]/lineArea[1]/@ipd"/>
  85. <eval expected="olden" xpath="//pageViewport[2]//flow/block/block[1]/lineArea[1]/text/word[1]"/>
  86. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block[2]/@ipd"/>
  87. <eval expected="12000" xpath="//pageViewport[2]//flow/block/block[2]/@space-before"/>
  88. <eval expected="(solid,#000000,1000)"
  89. xpath="//pageViewport[2]//flow/block/block[2]/@border-before"/>
  90. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block[2]/lineArea[1]/@ipd"/>
  91. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block[3]/@ipd"/>
  92. <eval expected="12000" xpath="//pageViewport[2]//flow/block/block[3]/@space-before"/>
  93. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block[3]/lineArea[1]/@ipd"/>
  94. </checks>
  95. </testcase>