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_reference-orientation.xml 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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 in-flow block-containers 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 column-count="2"/>
  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" margin="0pt" border="solid 5pt" border-top-color="red" reference-orientation="0">
  33. <!-- note: start|end-indent="0pt" is needed to reset the start-indent otherwise inherited from the parent. -->
  34. <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify" background-color="orange">ro = 0</fo:block>
  35. </fo:block-container>
  36. <fo:block-container width="80pt" height="120pt" margin="0pt" border="solid 5pt" border-top-color="red" reference-orientation="90">
  37. <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify" background-color="orange">ro = 90</fo:block>
  38. </fo:block-container>
  39. <fo:block-container width="120pt" height="80pt" margin="0pt" border="solid 5pt" border-top-color="red" reference-orientation="180">
  40. <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify" background-color="orange">ro = 180</fo:block>
  41. </fo:block-container>
  42. <fo:block-container width="80pt" height="120pt" margin="0pt" border="solid 5pt" border-top-color="red" reference-orientation="270">
  43. <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify" background-color="orange">ro = 270</fo:block>
  44. </fo:block-container>
  45. <fo:block-container width="120pt" height="80pt" margin="0pt" border="solid 5pt" border-top-color="red" reference-orientation="0">
  46. <!-- note: start|end-indent="0pt" is needed to reset the start-indent otherwise inherited from the parent. -->
  47. <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify" background-color="orange">ro = 0</fo:block>
  48. </fo:block-container>
  49. <fo:block-container width="80pt" height="120pt" margin="0pt" border="solid 5pt" border-top-color="red" reference-orientation="-90">
  50. <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify" background-color="orange">ro = -90</fo:block>
  51. </fo:block-container>
  52. <fo:block-container width="120pt" height="80pt" margin="0pt" border="solid 5pt" border-top-color="red" reference-orientation="-180">
  53. <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify" background-color="orange">ro = -180</fo:block>
  54. </fo:block-container>
  55. <fo:block-container width="80pt" height="120pt" margin="0pt" border="solid 5pt" border-top-color="red" reference-orientation="-270">
  56. <fo:block start-indent="0pt" end-indent="0pt" text-align-last="justify" background-color="orange">ro = -270</fo:block>
  57. </fo:block-container>
  58. </fo:flow>
  59. </fo:page-sequence>
  60. </fo:root>
  61. </fo>
  62. <checks>
  63. <!-- first block-container -->
  64. <true xpath="//mainReference/span/flow[1]/block[1]/@is-viewport-area"/>
  65. <eval expected="120000" xpath="//mainReference/span/flow[1]/block[1]/@ipd"/>
  66. <eval expected="130000" xpath="//mainReference/span/flow[1]/block[1]/@ipda"/>
  67. <eval expected="80000" xpath="//mainReference/span/flow[1]/block[1]/@bpd"/>
  68. <eval expected="90000" xpath="//mainReference/span/flow[1]/block[1]/@bpda"/>
  69. <eval expected="[1.0 0.0 0.0 1.0 5000.0 5000.0]" xpath="//mainReference/span/flow[1]/block[1]/@ctm"/>
  70. <!-- -> reference area -->
  71. <true xpath="//mainReference/span/flow[1]/block[1]/block[1]/@is-reference-area"/>
  72. <!-- -> containing block -->
  73. <eval expected="120000" xpath="//mainReference/span/flow[1]/block[1]/block[1]/block[1]/@ipd"/>
  74. <eval expected="120000" xpath="//mainReference/span/flow[1]/block[1]/block[1]/block[1]/@ipda"/>
  75. <eval expected="14400" xpath="//mainReference/span/flow[1]/block[1]/block[1]/block[1]/@bpd"/>
  76. <eval expected="14400" xpath="//mainReference/span/flow[1]/block[1]/block[1]/block[1]/@bpda"/>
  77. <!-- second block-container -->
  78. <true xpath="//mainReference/span/flow[1]/block[2]/@is-viewport-area"/>
  79. <eval expected="120000" xpath="//mainReference/span/flow[1]/block[2]/@ipd"/>
  80. <eval expected="130000" xpath="//mainReference/span/flow[1]/block[2]/@ipda"/>
  81. <eval expected="80000" xpath="//mainReference/span/flow[1]/block[2]/@bpd"/>
  82. <eval expected="90000" xpath="//mainReference/span/flow[1]/block[2]/@bpda"/>
  83. <eval expected="[0.0 -1.0 1.0 0.0 5000.0 85000.0]" xpath="//mainReference/span/flow[1]/block[2]/@ctm"/>
  84. <!-- -> reference area -->
  85. <true xpath="//mainReference/span/flow[1]/block[2]/block[1]/@is-reference-area"/>
  86. <!-- -> containing block -->
  87. <eval expected="80000" xpath="//mainReference/span/flow[1]/block[2]/block[1]/block[1]/@ipd"/>
  88. <eval expected="80000" xpath="//mainReference/span/flow[1]/block[2]/block[1]/block[1]/@ipda"/>
  89. <eval expected="14400" xpath="//mainReference/span/flow[1]/block[2]/block[1]/block[1]/@bpd"/>
  90. <eval expected="14400" xpath="//mainReference/span/flow[1]/block[2]/block[1]/block[1]/@bpda"/>
  91. <!-- third block-container -->
  92. <true xpath="//mainReference/span/flow[1]/block[3]/@is-viewport-area"/>
  93. <eval expected="120000" xpath="//mainReference/span/flow[1]/block[3]/@ipd"/>
  94. <eval expected="130000" xpath="//mainReference/span/flow[1]/block[3]/@ipda"/>
  95. <eval expected="80000" xpath="//mainReference/span/flow[1]/block[3]/@bpd"/>
  96. <eval expected="90000" xpath="//mainReference/span/flow[1]/block[3]/@bpda"/>
  97. <eval expected="[-1.0 -0.0 0.0 -1.0 125000.0 85000.0]" xpath="//mainReference/span/flow[1]/block[3]/@ctm"/>
  98. <!-- -> reference area -->
  99. <true xpath="//mainReference/span/flow[1]/block[3]/block[1]/@is-reference-area"/>
  100. <!-- -> containing block -->
  101. <eval expected="120000" xpath="//mainReference/span/flow[1]/block[3]/block[1]/block[1]/@ipd"/>
  102. <eval expected="120000" xpath="//mainReference/span/flow[1]/block[3]/block[1]/block[1]/@ipda"/>
  103. <eval expected="14400" xpath="//mainReference/span/flow[1]/block[3]/block[1]/block[1]/@bpd"/>
  104. <eval expected="14400" xpath="//mainReference/span/flow[1]/block[3]/block[1]/block[1]/@bpda"/>
  105. <!-- fourth block-container -->
  106. <true xpath="//mainReference/span/flow[1]/block[4]/@is-viewport-area"/>
  107. <eval expected="120000" xpath="//mainReference/span/flow[1]/block[4]/@ipd"/>
  108. <eval expected="130000" xpath="//mainReference/span/flow[1]/block[4]/@ipda"/>
  109. <eval expected="80000" xpath="//mainReference/span/flow[1]/block[4]/@bpd"/>
  110. <eval expected="90000" xpath="//mainReference/span/flow[1]/block[4]/@bpda"/>
  111. <eval expected="[0.0 1.0 -1.0 0.0 125000.0 5000.0]" xpath="//mainReference/span/flow[1]/block[4]/@ctm"/>
  112. <!-- -> reference area -->
  113. <true xpath="//mainReference/span/flow[1]/block[4]/block[1]/@is-reference-area"/>
  114. <!-- -> containing block -->
  115. <eval expected="80000" xpath="//mainReference/span/flow[1]/block[4]/block[1]/block[1]/@ipd"/>
  116. <eval expected="80000" xpath="//mainReference/span/flow[1]/block[4]/block[1]/block[1]/@ipda"/>
  117. <eval expected="14400" xpath="//mainReference/span/flow[1]/block[4]/block[1]/block[1]/@bpd"/>
  118. <eval expected="14400" xpath="//mainReference/span/flow[1]/block[4]/block[1]/block[1]/@bpda"/>
  119. <!-- firth block-container (same as first, no need to check) -->
  120. <!-- sixth block-container (same as fourth) -->
  121. <true xpath="//mainReference/span/flow[2]/block[2]/@is-viewport-area"/>
  122. <eval expected="120000" xpath="//mainReference/span/flow[2]/block[2]/@ipd"/>
  123. <eval expected="130000" xpath="//mainReference/span/flow[2]/block[2]/@ipda"/>
  124. <eval expected="80000" xpath="//mainReference/span/flow[2]/block[2]/@bpd"/>
  125. <eval expected="90000" xpath="//mainReference/span/flow[2]/block[2]/@bpda"/>
  126. <eval expected="[0.0 1.0 -1.0 0.0 125000.0 5000.0]" xpath="//mainReference/span/flow[2]/block[2]/@ctm"/>
  127. <!-- -> reference area -->
  128. <true xpath="//mainReference/span/flow[2]/block[2]/block[1]/@is-reference-area"/>
  129. <!-- -> containing block -->
  130. <eval expected="80000" xpath="//mainReference/span/flow[2]/block[2]/block[1]/block[1]/@ipd"/>
  131. <eval expected="80000" xpath="//mainReference/span/flow[2]/block[2]/block[1]/block[1]/@ipda"/>
  132. <eval expected="14400" xpath="//mainReference/span/flow[2]/block[2]/block[1]/block[1]/@bpd"/>
  133. <eval expected="14400" xpath="//mainReference/span/flow[2]/block[2]/block[1]/block[1]/@bpda"/>
  134. <!-- seventh block-container (same as third) -->
  135. <true xpath="//mainReference/span/flow[2]/block[3]/@is-viewport-area"/>
  136. <eval expected="120000" xpath="//mainReference/span/flow[2]/block[3]/@ipd"/>
  137. <eval expected="130000" xpath="//mainReference/span/flow[2]/block[3]/@ipda"/>
  138. <eval expected="80000" xpath="//mainReference/span/flow[2]/block[3]/@bpd"/>
  139. <eval expected="90000" xpath="//mainReference/span/flow[2]/block[3]/@bpda"/>
  140. <eval expected="[-1.0 -0.0 0.0 -1.0 125000.0 85000.0]" xpath="//mainReference/span/flow[2]/block[3]/@ctm"/>
  141. <!-- -> reference area -->
  142. <true xpath="//mainReference/span/flow[2]/block[3]/block[1]/@is-reference-area"/>
  143. <!-- -> containing block -->
  144. <eval expected="120000" xpath="//mainReference/span/flow[2]/block[3]/block[1]/block[1]/@ipd"/>
  145. <eval expected="120000" xpath="//mainReference/span/flow[2]/block[3]/block[1]/block[1]/@ipda"/>
  146. <eval expected="14400" xpath="//mainReference/span/flow[2]/block[3]/block[1]/block[1]/@bpd"/>
  147. <eval expected="14400" xpath="//mainReference/span/flow[2]/block[3]/block[1]/block[1]/@bpda"/>
  148. <!-- eighth block-container (same as second) -->
  149. <true xpath="//mainReference/span/flow[2]/block[4]/@is-viewport-area"/>
  150. <eval expected="120000" xpath="//mainReference/span/flow[2]/block[4]/@ipd"/>
  151. <eval expected="130000" xpath="//mainReference/span/flow[2]/block[4]/@ipda"/>
  152. <eval expected="80000" xpath="//mainReference/span/flow[2]/block[4]/@bpd"/>
  153. <eval expected="90000" xpath="//mainReference/span/flow[2]/block[4]/@bpda"/>
  154. <eval expected="[0.0 -1.0 1.0 0.0 5000.0 85000.0]" xpath="//mainReference/span/flow[2]/block[4]/@ctm"/>
  155. <!-- -> reference area -->
  156. <true xpath="//mainReference/span/flow[2]/block[4]/block[1]/@is-reference-area"/>
  157. <!-- -> containing block -->
  158. <eval expected="80000" xpath="//mainReference/span/flow[2]/block[4]/block[1]/block[1]/@ipd"/>
  159. <eval expected="80000" xpath="//mainReference/span/flow[2]/block[4]/block[1]/block[1]/@ipda"/>
  160. <eval expected="14400" xpath="//mainReference/span/flow[2]/block[4]/block[1]/block[1]/@bpd"/>
  161. <eval expected="14400" xpath="//mainReference/span/flow[2]/block[4]/block[1]/block[1]/@bpda"/>
  162. </checks>
  163. </testcase>