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_block-container_2.xml 5.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 a change of IPD between two blocks surrounded by a block-container is
  21. correctly handled.
  22. </p>
  23. <!-- NOTE: This test case is a copy of flow_changing-ipd_3.xml, with the surrounding block
  24. replaced with a block-container. -->
  25. </info>
  26. <fo>
  27. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  28. <fo:layout-master-set>
  29. <fo:simple-page-master master-name="narrow"
  30. page-height="300pt" page-width="400pt" margin="50pt">
  31. <fo:region-body background-color="#F0F0F0"/>
  32. </fo:simple-page-master>
  33. <fo:simple-page-master master-name="wide"
  34. page-height="300pt" page-width="600pt" margin="50pt">
  35. <fo:region-body background-color="#F0F0F0"/>
  36. </fo:simple-page-master>
  37. <fo:page-sequence-master master-name="pages">
  38. <fo:single-page-master-reference master-reference="narrow"/>
  39. <fo:repeatable-page-master-reference master-reference="wide"/>
  40. </fo:page-sequence-master>
  41. </fo:layout-master-set>
  42. <fo:page-sequence master-reference="pages">
  43. <fo:flow flow-name="xsl-region-body">
  44. <fo:block-container text-align="justify" id="surrounding"
  45. space-before.minimum="10pt"
  46. space-before.optimum="12pt"
  47. space-before.maximum="50pt">
  48. <fo:block space-before="inherit" id="b1">In olden times when wishing still helped one,
  49. there lived a king whose daughters were all beautiful, but the youngest was so
  50. beautiful that the sun itself, which has seen so much, was astonished whenever it
  51. shone in her face.</fo:block>
  52. <fo:block space-before="inherit" id="b2">In olden times when wishing still helped one,
  53. there lived a king whose daughters were all beautiful, but the youngest was so
  54. beautiful that the sun itself, which has seen so much, was astonished whenever it
  55. shone in her face.</fo:block>
  56. <fo:block space-before="inherit" id="b3">In olden times when wishing still helped one,
  57. there lived a king whose daughters were all beautiful, but the youngest was so
  58. beautiful that the sun itself, which has seen so much, was astonished whenever it
  59. shone in her face.</fo:block>
  60. <fo:block border-top="1pt solid black" space-before.minimum="10pt"
  61. space-before.optimum="12pt" space-before.maximum="50pt"
  62. space-before.conditionality="retain" id="b4">In olden times when wishing still helped
  63. one, there lived a king whose daughters were all beautiful, but the youngest was so
  64. beautiful that the sun itself, which has seen so much, was astonished whenever it
  65. shone in her face.</fo:block>
  66. <fo:block space-before="inherit" id="b5">In olden times when wishing still helped one,
  67. there lived a king whose daughters were all beautiful, but the youngest was so
  68. beautiful that the sun itself, which has seen so much, was astonished whenever it
  69. shone in her face.</fo:block>
  70. </fo:block-container>
  71. </fo:flow>
  72. </fo:page-sequence>
  73. </fo:root>
  74. </fo>
  75. <checks>
  76. <eval expected="face." xpath="//pageViewport[1]//flow/block/block/block[3]/lineArea[4]/text/word[position()=last()]"/>
  77. <eval expected="12000" xpath="//pageViewport[2]//flow/block/block/block[1]/@space-before"/>
  78. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block/block[1]/@ipd"/>
  79. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block/block[1]/lineArea[1]/@ipd"/>
  80. <eval expected="(solid,#000000,1000)"
  81. xpath="//pageViewport[2]//flow/block/block/block[1]/@border-before"/>
  82. <eval expected="In" xpath="//pageViewport[2]//flow/block/block/block[1]/lineArea[1]/text/word[1]"/>
  83. <eval expected="olden" xpath="//pageViewport[2]//flow/block/block/block[1]/lineArea[1]/text/word[2]"/>
  84. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block/block[2]/@ipd"/>
  85. <eval expected="500000" xpath="//pageViewport[2]//flow/block/block/block[2]/lineArea[1]/@ipd"/>
  86. </checks>
  87. </testcase>