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.

block-container_display-align_space-before.xml 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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 on in-flow block-containers. It also tests space-before|after in conjunction with reference-orientation.
  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/>
  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="120pt" height="80pt" reference-orientation="0" display-align="auto" background-color="yellow">
  33. <fo:block background-color="orange">display-align = "auto"</fo:block>
  34. <fo:block background-color="orange">ro = 0</fo:block>
  35. </fo:block-container>
  36. <fo:block-container width="80pt" height="120pt" reference-orientation="90" display-align="before" background-color="yellow" space-before="10pt" space-after="10pt">
  37. <fo:block background-color="orange">display-align = "before"</fo:block>
  38. <fo:block background-color="orange">ro = 90</fo:block>
  39. </fo:block-container>
  40. <fo:block-container width="120pt" height="80pt" reference-orientation="180" display-align="center" background-color="yellow">
  41. <fo:block background-color="orange">display-align = "center"</fo:block>
  42. <fo:block background-color="orange">ro = 180</fo:block>
  43. </fo:block-container>
  44. <fo:block-container width="80pt" height="120pt" reference-orientation="270" display-align="after" background-color="yellow" space-before="10pt">
  45. <fo:block background-color="orange">display-align = "after"</fo:block>
  46. <fo:block background-color="orange">ro = 270</fo:block>
  47. </fo:block-container>
  48. </fo:flow>
  49. </fo:page-sequence>
  50. </fo:root>
  51. </fo>
  52. <checks>
  53. <!-- first block-container -->
  54. <true xpath="//flow/block[1]/@is-viewport-area"/>
  55. <eval expected="[1.0 0.0 0.0 1.0 0.0 0.0]" xpath="//flow/block[1]/@ctm"/>
  56. <eval expected="120000" xpath="//flow/block[1]/@ipd"/>
  57. <eval expected="120000" xpath="//flow/block[1]/@ipda"/>
  58. <eval expected="80000" xpath="//flow/block[1]/@bpd"/>
  59. <eval expected="80000" xpath="//flow/block[1]/@bpda"/>
  60. <!-- -> reference area -->
  61. <true xpath="//flow/block[1]/block[1]/@is-reference-area"/>
  62. <eval expected="120000" xpath="//flow/block[1]/block[1]/@ipd"/>
  63. <eval expected="120000" xpath="//flow/block[1]/block[1]/@ipda"/>
  64. <eval expected="28800" xpath="//flow/block[1]/block[1]/@bpd"/>
  65. <eval expected="28800" xpath="//flow/block[1]/block[1]/@bpda"/>
  66. <!-- space-before of second block-container -->
  67. <eval expected="10000" xpath="//flow/block[2]/@space-before"/>
  68. <!-- second block-container -->
  69. <true xpath="//flow/block[2]/@is-viewport-area"/>
  70. <eval expected="[0.0 -1.0 1.0 0.0 0.0 80000.0]" xpath="//flow/block[2]/@ctm"/>
  71. <eval expected="120000" xpath="//flow/block[2]/@ipd"/>
  72. <eval expected="120000" xpath="//flow/block[2]/@ipda"/>
  73. <eval expected="80000" xpath="//flow/block[2]/@bpd"/>
  74. <eval expected="100000" xpath="//flow/block[2]/@bpda"/>
  75. <!-- -> reference area -->
  76. <true xpath="//flow/block[2]/block[1]/@is-reference-area"/>
  77. <eval expected="80000" xpath="//flow/block[2]/block[1]/@ipd"/>
  78. <eval expected="80000" xpath="//flow/block[2]/block[1]/@ipda"/>
  79. <eval expected="43200" xpath="//flow/block[2]/block[1]/@bpd"/>
  80. <eval expected="43200" xpath="//flow/block[2]/block[1]/@bpda"/>
  81. <!-- space-after of second block-container -->
  82. <eval expected="10000" xpath="//flow/block[2]/@space-after"/>
  83. <!-- third block-container -->
  84. <true xpath="//flow/block[3]/@is-viewport-area"/>
  85. <eval expected="[-1.0 -0.0 0.0 -1.0 120000.0 80000.0]" xpath="//flow/block[3]/@ctm"/>
  86. <eval expected="120000" xpath="//flow/block[3]/@ipd"/>
  87. <eval expected="120000" xpath="//flow/block[3]/@ipda"/>
  88. <eval expected="80000" xpath="//flow/block[3]/@bpd"/>
  89. <eval expected="80000" xpath="//flow/block[3]/@bpda"/>
  90. <!-- -> reference area -->
  91. <true xpath="//flow/block[3]/block[1]/@is-reference-area"/>
  92. <eval expected="120000" xpath="//flow/block[3]/block[1]/@ipd"/>
  93. <eval expected="120000" xpath="//flow/block[3]/block[1]/@ipda"/>
  94. <eval expected="61600" xpath="//flow/block[3]/block[1]/@bpd"/>
  95. <eval expected="61600" xpath="//flow/block[3]/block[1]/@bpda"/>
  96. <!-- contents (spacer first, then three lines) -->
  97. <eval expected="18400" xpath="//flow/block[3]/block[1]/block[1]/@bpda"/>
  98. <eval expected="28800" xpath="//flow/block[3]/block[1]/block[2]/@bpda"/>
  99. <eval expected="14400" xpath="//flow/block[3]/block[1]/block[3]/@bpda"/>
  100. <!-- space-before of fourth block-container -->
  101. <eval expected="10000" xpath="//flow/block[4]/@space-before"/>
  102. <!-- fourth block-container -->
  103. <true xpath="//flow/block[4]/@is-viewport-area"/>
  104. <eval expected="[0.0 1.0 -1.0 0.0 120000.0 0.0]" xpath="//flow/block[4]/@ctm"/>
  105. <eval expected="120000" xpath="//flow/block[4]/@ipd"/>
  106. <eval expected="120000" xpath="//flow/block[4]/@ipda"/>
  107. <eval expected="80000" xpath="//flow/block[4]/@bpd"/>
  108. <eval expected="90000" xpath="//flow/block[4]/@bpda"/>
  109. <!-- -> reference area -->
  110. <true xpath="//flow/block[4]/block[1]/@is-reference-area"/>
  111. <eval expected="80000" xpath="//flow/block[4]/block[1]/@ipd"/>
  112. <eval expected="80000" xpath="//flow/block[4]/block[1]/@ipda"/>
  113. <eval expected="120000" xpath="//flow/block[4]/block[1]/@bpd"/>
  114. <eval expected="120000" xpath="//flow/block[4]/block[1]/@bpda"/>
  115. <!-- contents (spacer first, then three lines) -->
  116. <eval expected="76800" xpath="//flow/block[4]/block[1]/block[1]/@bpda"/>
  117. <eval expected="28800" xpath="//flow/block[4]/block[1]/block[2]/@bpda"/>
  118. <eval expected="14400" xpath="//flow/block[4]/block[1]/block[3]/@bpda"/>
  119. </checks>
  120. </testcase>