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_1.xml 5.9KB

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