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

block-container_display-align_distribute.xml 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 display-align="distribute" (The value "distribute" is a proprietary extension to XSL-FO).
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  27. <fo:region-body column-count="4" column-gap="5pt"/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block-container width="100%" height="4.2in" display-align="distribute" background-color="yellow">
  33. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  34. "distribute" 4.2in
  35. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  36. </fo:block>
  37. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  38. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  39. </fo:block>
  40. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  41. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  42. </fo:block>
  43. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  44. <!-- last -->
  45. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  46. </fo:block>
  47. </fo:block-container>
  48. <fo:block-container width="100%" height="4.8in" display-align="distribute" background-color="yellow">
  49. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  50. "distribute" 4.8in
  51. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  52. </fo:block>
  53. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  54. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  55. </fo:block>
  56. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  57. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  58. </fo:block>
  59. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  60. <!-- last -->
  61. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  62. </fo:block>
  63. </fo:block-container>
  64. <fo:block-container width="100%" height="3.85in" display-align="distribute" background-color="yellow">
  65. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  66. "distribute" 3.85in
  67. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  68. </fo:block>
  69. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  70. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  71. </fo:block>
  72. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  73. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  74. </fo:block>
  75. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  76. <!-- last -->
  77. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  78. </fo:block>
  79. </fo:block-container>
  80. <fo:block-container width="100%" height="4.2in" display-align="auto" background-color="orange">
  81. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  82. "auto"
  83. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  84. </fo:block>
  85. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  86. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  87. </fo:block>
  88. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  89. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  90. </fo:block>
  91. <fo:block space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em">
  92. <!-- last -->
  93. Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1 Text 1
  94. </fo:block>
  95. </fo:block-container>
  96. </fo:flow>
  97. </fo:page-sequence>
  98. </fo:root>
  99. </fo>
  100. <checks>
  101. <!-- check with 3 mpt tolerance -->
  102. <eval expected="0" xpath="//flow[1]/block[1]/@bpd - //flow[1]/block[1]/block[1]/@bpd" tolerance="3"/>
  103. <eval expected="14400" xpath="//flow[2]/block[1]/@bpd - //flow[2]/block[1]/block[1]/@bpd" tolerance="3"/>
  104. <eval expected="0" xpath="//flow[3]/block[1]/@bpd - //flow[3]/block[1]/block[1]/@bpd" tolerance="3"/>
  105. <eval expected="21600" xpath="//flow[4]/block[1]/@bpd - //flow[4]/block[1]/block[1]/@bpd" tolerance="3"/>
  106. </checks>
  107. </testcase>