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.

region_display-align_table.xml 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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 the implementation of display-align in all regions.
  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="before" page-width="5in" page-height="5in" margin="10pt">
  27. <fo:region-body background-color="rgb(100%, 100%, 80%)" margin="30pt" display-align="before"/>
  28. <fo:region-before background-color="rgb(100%, 80%, 80%)" extent="30pt" display-align="before"/>
  29. <fo:region-after background-color="rgb(80%, 80%, 80%)" extent="30pt" display-align="before"/>
  30. <fo:region-start background-color="rgb(80%, 100%, 80%)" extent="30pt" display-align="before"/>
  31. <fo:region-end background-color="rgb(80%, 80%, 100%)" extent="30pt" display-align="before"/>
  32. </fo:simple-page-master>
  33. <fo:simple-page-master master-name="center" page-width="5in" page-height="5in" margin="10pt">
  34. <fo:region-body background-color="rgb(100%, 100%, 80%)" margin="30pt" display-align="center"/>
  35. <fo:region-before background-color="rgb(100%, 80%, 80%)" extent="30pt" display-align="center"/>
  36. <fo:region-after background-color="rgb(80%, 80%, 80%)" extent="30pt" display-align="center"/>
  37. <fo:region-start background-color="rgb(80%, 100%, 80%)" extent="30pt" display-align="center"/>
  38. <fo:region-end background-color="rgb(80%, 80%, 100%)" extent="30pt" display-align="center"/>
  39. </fo:simple-page-master>
  40. <fo:simple-page-master master-name="after" page-width="5in" page-height="5in" margin="10pt">
  41. <fo:region-body background-color="rgb(100%, 100%, 80%)" margin="30pt" display-align="after"/>
  42. <fo:region-before background-color="rgb(100%, 80%, 80%)" extent="30pt" display-align="after"/>
  43. <fo:region-after background-color="rgb(80%, 80%, 80%)" extent="30pt" display-align="after"/>
  44. <fo:region-start background-color="rgb(80%, 100%, 80%)" extent="30pt" display-align="after"/>
  45. <fo:region-end background-color="rgb(80%, 80%, 100%)" extent="30pt" display-align="after"/>
  46. </fo:simple-page-master>
  47. </fo:layout-master-set>
  48. <fo:page-sequence master-reference="before">
  49. <fo:static-content flow-name="xsl-region-before">
  50. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  51. <fo:table-column column-number="1" width="100%"/>
  52. <fo:table-body>
  53. <fo:table-row>
  54. <fo:table-cell column-number="1">
  55. <fo:block>X</fo:block>
  56. </fo:table-cell>
  57. </fo:table-row>
  58. </fo:table-body>
  59. </fo:table>
  60. </fo:static-content>
  61. <fo:static-content flow-name="xsl-region-after">
  62. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  63. <fo:table-column column-number="1" width="100%"/>
  64. <fo:table-body>
  65. <fo:table-row>
  66. <fo:table-cell column-number="1">
  67. <fo:block>X</fo:block>
  68. </fo:table-cell>
  69. </fo:table-row>
  70. </fo:table-body>
  71. </fo:table>
  72. </fo:static-content>
  73. <fo:static-content flow-name="xsl-region-start">
  74. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  75. <fo:table-column column-number="1" width="100%"/>
  76. <fo:table-body>
  77. <fo:table-row>
  78. <fo:table-cell column-number="1">
  79. <fo:block>X</fo:block>
  80. </fo:table-cell>
  81. </fo:table-row>
  82. </fo:table-body>
  83. </fo:table>
  84. </fo:static-content>
  85. <fo:static-content flow-name="xsl-region-end">
  86. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  87. <fo:table-column column-number="1" width="100%"/>
  88. <fo:table-body>
  89. <fo:table-row>
  90. <fo:table-cell column-number="1">
  91. <fo:block>X</fo:block>
  92. </fo:table-cell>
  93. </fo:table-row>
  94. </fo:table-body>
  95. </fo:table>
  96. </fo:static-content>
  97. <fo:flow flow-name="xsl-region-body">
  98. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  99. <fo:table-column column-number="1" width="100%"/>
  100. <fo:table-body>
  101. <fo:table-row>
  102. <fo:table-cell column-number="1">
  103. <fo:block>X</fo:block>
  104. </fo:table-cell>
  105. </fo:table-row>
  106. </fo:table-body>
  107. </fo:table>
  108. </fo:flow>
  109. </fo:page-sequence>
  110. <fo:page-sequence master-reference="center">
  111. <fo:static-content flow-name="xsl-region-before">
  112. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  113. <fo:table-column column-number="1" width="100%"/>
  114. <fo:table-body>
  115. <fo:table-row>
  116. <fo:table-cell column-number="1">
  117. <fo:block>X</fo:block>
  118. </fo:table-cell>
  119. </fo:table-row>
  120. </fo:table-body>
  121. </fo:table>
  122. </fo:static-content>
  123. <fo:static-content flow-name="xsl-region-after">
  124. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  125. <fo:table-column column-number="1" width="100%"/>
  126. <fo:table-body>
  127. <fo:table-row>
  128. <fo:table-cell column-number="1">
  129. <fo:block>X</fo:block>
  130. </fo:table-cell>
  131. </fo:table-row>
  132. </fo:table-body>
  133. </fo:table>
  134. </fo:static-content>
  135. <fo:static-content flow-name="xsl-region-start">
  136. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  137. <fo:table-column column-number="1" width="100%"/>
  138. <fo:table-body>
  139. <fo:table-row>
  140. <fo:table-cell column-number="1">
  141. <fo:block>X</fo:block>
  142. </fo:table-cell>
  143. </fo:table-row>
  144. </fo:table-body>
  145. </fo:table>
  146. </fo:static-content>
  147. <fo:static-content flow-name="xsl-region-end">
  148. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  149. <fo:table-column column-number="1" width="100%"/>
  150. <fo:table-body>
  151. <fo:table-row>
  152. <fo:table-cell column-number="1">
  153. <fo:block>X</fo:block>
  154. </fo:table-cell>
  155. </fo:table-row>
  156. </fo:table-body>
  157. </fo:table>
  158. </fo:static-content>
  159. <fo:flow flow-name="xsl-region-body">
  160. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  161. <fo:table-column column-number="1" width="100%"/>
  162. <fo:table-body>
  163. <fo:table-row>
  164. <fo:table-cell column-number="1">
  165. <fo:block>X</fo:block>
  166. </fo:table-cell>
  167. </fo:table-row>
  168. </fo:table-body>
  169. </fo:table>
  170. </fo:flow>
  171. </fo:page-sequence>
  172. <fo:page-sequence master-reference="after">
  173. <fo:static-content flow-name="xsl-region-before">
  174. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  175. <fo:table-column column-number="1" width="100%"/>
  176. <fo:table-body>
  177. <fo:table-row>
  178. <fo:table-cell column-number="1">
  179. <fo:block>X</fo:block>
  180. </fo:table-cell>
  181. </fo:table-row>
  182. </fo:table-body>
  183. </fo:table>
  184. </fo:static-content>
  185. <fo:static-content flow-name="xsl-region-after">
  186. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  187. <fo:table-column column-number="1" width="100%"/>
  188. <fo:table-body>
  189. <fo:table-row>
  190. <fo:table-cell column-number="1">
  191. <fo:block>X</fo:block>
  192. </fo:table-cell>
  193. </fo:table-row>
  194. </fo:table-body>
  195. </fo:table>
  196. </fo:static-content>
  197. <fo:static-content flow-name="xsl-region-start">
  198. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  199. <fo:table-column column-number="1" width="100%"/>
  200. <fo:table-body>
  201. <fo:table-row>
  202. <fo:table-cell column-number="1">
  203. <fo:block>X</fo:block>
  204. </fo:table-cell>
  205. </fo:table-row>
  206. </fo:table-body>
  207. </fo:table>
  208. </fo:static-content>
  209. <fo:static-content flow-name="xsl-region-end">
  210. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  211. <fo:table-column column-number="1" width="100%"/>
  212. <fo:table-body>
  213. <fo:table-row>
  214. <fo:table-cell column-number="1">
  215. <fo:block>X</fo:block>
  216. </fo:table-cell>
  217. </fo:table-row>
  218. </fo:table-body>
  219. </fo:table>
  220. </fo:static-content>
  221. <fo:flow flow-name="xsl-region-body">
  222. <fo:table width="20pt" table-layout="fixed" border="1pt solid red" border-collapse="separate">
  223. <fo:table-column column-number="1" width="100%"/>
  224. <fo:table-body>
  225. <fo:table-row>
  226. <fo:table-cell column-number="1">
  227. <fo:block>X</fo:block>
  228. </fo:table-cell>
  229. </fo:table-row>
  230. </fo:table-body>
  231. </fo:table>
  232. </fo:flow>
  233. </fo:page-sequence>
  234. </fo:root>
  235. </fo>
  236. <checks>
  237. <eval expected="0 0 360000 360000" xpath="//pageViewport[1]/@bounds"/>
  238. <!-- display-align="center" -->
  239. <eval expected="6800" xpath="//pageViewport[@nr='2']//regionBefore/block[1]/@bpd"/>
  240. <eval expected="161800" xpath="//pageViewport[@nr='2']//regionStart/block[1]/@bpd"/>
  241. <eval expected="161800" xpath="//pageViewport[@nr='2']//regionEnd/block[1]/@bpd"/>
  242. <eval expected="6800" xpath="//pageViewport[@nr='2']//regionAfter/block[1]/@bpd"/>
  243. <eval expected="131800" xpath="//pageViewport[@nr='2']//regionBody//block[1]/@bpd"/>
  244. <!-- display-align="after" -->
  245. <eval expected="13600" xpath="//pageViewport[@nr='3']//regionBefore/block[1]/@bpd"/>
  246. <eval expected="323600" xpath="//pageViewport[@nr='3']//regionStart/block[1]/@bpd"/>
  247. <eval expected="323600" xpath="//pageViewport[@nr='3']//regionEnd/block[1]/@bpd"/>
  248. <eval expected="13600" xpath="//pageViewport[@nr='3']//regionAfter/block[1]/@bpd"/>
  249. <eval expected="263600" xpath="//pageViewport[@nr='3']//regionBody//block[1]/@bpd"/>
  250. </checks>
  251. </testcase>