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.

flow_changing-ipd_2.xml 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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">
  41. <fo:block id="b1">In olden times when wishing still helped one, there lived a king whose
  42. daughters were all beautiful, but the youngest was so beautiful that the sun itself,
  43. which has seen so much, was astonished whenever it shone in her face.</fo:block>
  44. <fo:block id="b2">In olden times when wishing still helped one, there lived a king whose
  45. daughters were all beautiful, but the youngest was so beautiful that the sun itself,
  46. which has seen so much, was astonished whenever it shone in her face.</fo:block>
  47. <fo:block id="b3">In olden times when wishing still helped one, there lived a king whose
  48. daughters were all beautiful, but the youngest was so beautiful that the sun itself,
  49. which has seen so much, was astonished whenever it shone in her face. In olden times
  50. when wishing still helped one, there lived a king whose daughters were all beautiful,
  51. but the youngest was so beautiful that the sun itself, which has seen so much, was
  52. astonished whenever it shone in her face.</fo:block>
  53. <fo:block id="b4">In olden times when wishing still helped one, there lived a king whose
  54. daughters were all beautiful, but the youngest was so beautiful that the sun itself,
  55. which has seen so much, was astonished whenever it shone in her face.</fo:block>
  56. <fo:block id="b5">In olden times when wishing still helped one, there lived a king whose
  57. daughters were all beautiful, but the youngest was so beautiful that the sun itself,
  58. which has seen so much, was astonished whenever it shone in her face.</fo:block>
  59. </fo:flow>
  60. </fo:page-sequence>
  61. </fo:root>
  62. </fo>
  63. <checks>
  64. <eval expected="has" xpath="//pageViewport[1]//flow/block[3]/lineArea[3]/text/word[position()=last()]"/>
  65. <eval expected="500000" xpath="//pageViewport[2]//flow/block[1]/@ipd"/>
  66. <eval expected="500000" xpath="//pageViewport[2]//flow/block[1]/lineArea[1]/@ipd"/>
  67. <eval expected="seen" xpath="//pageViewport[2]//flow/block[1]/lineArea[1]/text/word[1]"/>
  68. <eval expected="500000" xpath="//pageViewport[2]//flow/block[2]/@ipd"/>
  69. <eval expected="500000" xpath="//pageViewport[2]//flow/block[2]/lineArea[1]/@ipd"/>
  70. <eval expected="500000" xpath="//pageViewport[2]//flow/block[3]/@ipd"/>
  71. <eval expected="500000" xpath="//pageViewport[2]//flow/block[3]/lineArea[1]/@ipd"/>
  72. </checks>
  73. </testcase>