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.

table-cell_various-combinations.xml 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 certain aspects of the area tree generation for table-cells.
  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:table table-layout="fixed" border-collapse="separate">
  33. <fo:table-column column-width="100%"/>
  34. <fo:table-body>
  35. <fo:table-cell starts-row="true" ends-row="true">
  36. <fo:block>plain block</fo:block>
  37. </fo:table-cell>
  38. <fo:table-cell starts-row="true" border="solid 5pt" background-color="yellow" ends-row="true">
  39. <fo:block>cell with border</fo:block>
  40. </fo:table-cell>
  41. <fo:table-cell starts-row="true" padding="5pt" ends-row="true">
  42. <fo:block background-color="orange">cell with padding</fo:block>
  43. </fo:table-cell>
  44. <fo:table-cell starts-row="true" border="solid 5pt" padding="5pt" background-color="yellow" ends-row="true">
  45. <fo:block background-color="orange">cell with border and padding</fo:block>
  46. </fo:table-cell>
  47. <fo:table-cell starts-row="true" border="solid 5pt" height="30pt" display-align="center" ends-row="true">
  48. <fo:block>cell with border and height</fo:block>
  49. </fo:table-cell>
  50. <fo:table-cell starts-row="true" padding="5pt" height="30pt" display-align="center" background-color="yellow" ends-row="true">
  51. <fo:block background-color="orange">cell with padding and height</fo:block>
  52. </fo:table-cell>
  53. </fo:table-body>
  54. </fo:table>
  55. </fo:flow>
  56. </fo:page-sequence>
  57. </fo:root>
  58. </fo>
  59. <checks>
  60. <!-- row 1 -->
  61. <eval expected="360000" xpath="//flow/block[1]/block[1]/@ipd"/>
  62. <eval expected="360000" xpath="//flow/block[1]/block[1]/@ipda"/>
  63. <eval expected="14400" xpath="//flow/block[1]/block[1]/@bpd"/>
  64. <eval expected="14400" xpath="//flow/block[1]/block[1]/@bpda"/>
  65. <eval expected="360000" xpath="//flow/block[1]/block[1]/block[1]/@ipd"/>
  66. <eval expected="14400" xpath="//flow/block[1]/block[1]/block[1]/@bpd"/>
  67. <!-- row 2 -->
  68. <eval expected="5000" xpath="//flow/block[1]/block[2]/@left-offset"/>
  69. <eval expected="14400" xpath="//flow/block[1]/block[2]/@top-offset"/>
  70. <eval expected="350000" xpath="//flow/block[1]/block[2]/@ipd"/>
  71. <eval expected="360000" xpath="//flow/block[1]/block[2]/@ipda"/>
  72. <eval expected="14400" xpath="//flow/block[1]/block[2]/@bpd"/>
  73. <eval expected="24400" xpath="//flow/block[1]/block[2]/@bpda"/>
  74. <eval expected="350000" xpath="//flow/block[1]/block[2]/block[1]/@ipd"/>
  75. <eval expected="14400" xpath="//flow/block[1]/block[2]/block[1]/@bpd"/>
  76. <!-- row 3 -->
  77. <eval expected="5000" xpath="//flow/block[1]/block[3]/@left-offset"/>
  78. <eval expected="38800" xpath="//flow/block[1]/block[3]/@top-offset"/>
  79. <eval expected="350000" xpath="//flow/block[1]/block[3]/@ipd"/>
  80. <eval expected="360000" xpath="//flow/block[1]/block[3]/@ipda"/>
  81. <eval expected="14400" xpath="//flow/block[1]/block[3]/@bpd"/>
  82. <eval expected="24400" xpath="//flow/block[1]/block[3]/@bpda"/>
  83. <eval expected="350000" xpath="//flow/block[1]/block[3]/block[1]/@ipd"/>
  84. <eval expected="14400" xpath="//flow/block[1]/block[3]/block[1]/@bpd"/>
  85. <!-- row 4 -->
  86. <eval expected="10000" xpath="//flow/block[1]/block[4]/@left-offset"/>
  87. <eval expected="63200" xpath="//flow/block[1]/block[4]/@top-offset"/>
  88. <eval expected="340000" xpath="//flow/block[1]/block[4]/@ipd"/>
  89. <eval expected="360000" xpath="//flow/block[1]/block[4]/@ipda"/>
  90. <eval expected="14400" xpath="//flow/block[1]/block[4]/@bpd"/>
  91. <eval expected="34400" xpath="//flow/block[1]/block[4]/@bpda"/>
  92. <eval expected="340000" xpath="//flow/block[1]/block[4]/block[1]/@ipd"/>
  93. <eval expected="14400" xpath="//flow/block[1]/block[4]/block[1]/@bpd"/>
  94. <!-- row 5 -->
  95. <eval expected="5000" xpath="//flow/block[1]/block[5]/@left-offset"/>
  96. <eval expected="97600" xpath="//flow/block[1]/block[5]/@top-offset"/>
  97. <eval expected="350000" xpath="//flow/block[1]/block[5]/@ipd"/>
  98. <eval expected="360000" xpath="//flow/block[1]/block[5]/@ipda"/>
  99. <eval expected="30000" xpath="//flow/block[1]/block[5]/@bpd"/>
  100. <eval expected="40000" xpath="//flow/block[1]/block[5]/@bpda"/>
  101. <eval expected="7800" xpath="//flow/block[1]/block[5]/block[1]/@bpd"/> <!--spacer-->
  102. <eval expected="350000" xpath="//flow/block[1]/block[5]/block[2]/@ipd"/>
  103. <eval expected="14400" xpath="//flow/block[1]/block[5]/block[2]/@bpd"/>
  104. <!-- row 6 -->
  105. <eval expected="5000" xpath="//flow/block[1]/block[6]/@left-offset"/>
  106. <eval expected="137600" xpath="//flow/block[1]/block[6]/@top-offset"/>
  107. <eval expected="350000" xpath="//flow/block[1]/block[6]/@ipd"/>
  108. <eval expected="360000" xpath="//flow/block[1]/block[6]/@ipda"/>
  109. <eval expected="30000" xpath="//flow/block[1]/block[6]/@bpd"/>
  110. <eval expected="40000" xpath="//flow/block[1]/block[6]/@bpda"/>
  111. <eval expected="7800" xpath="//flow/block[1]/block[6]/block[1]/@bpd"/> <!--spacer-->
  112. <eval expected="350000" xpath="//flow/block[1]/block[6]/block[2]/@ipd"/>
  113. <eval expected="14400" xpath="//flow/block[1]/block[6]/block[2]/@bpd"/>
  114. <element-list category="breaker">
  115. <box w="14400"/>
  116. <penalty w="0" p="0"/>
  117. <box w="24400"/>
  118. <penalty w="0" p="0"/>
  119. <box w="24400"/>
  120. <penalty w="0" p="0"/>
  121. <box w="34400"/>
  122. <penalty w="0" p="0"/>
  123. <box w="40000"/>
  124. <penalty w="0" p="0"/>
  125. <box w="40000"/>
  126. <skip>3</skip>
  127. </element-list>
  128. </checks>
  129. </testcase>