Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

table-cell_height.xml 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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 tables, especially table-cells. This test: height and block-progression-dimension.
  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">
  33. <fo:table-column column-width="2in"/>
  34. <fo:table-column column-width="3in"/>
  35. <fo:table-body>
  36. <fo:table-row>
  37. <fo:table-cell>
  38. <fo:block>cell1</fo:block>
  39. </fo:table-cell>
  40. <fo:table-cell>
  41. <fo:block>cell2</fo:block>
  42. </fo:table-cell>
  43. </fo:table-row>
  44. <fo:table-row>
  45. <fo:table-cell>
  46. <fo:block>cell3</fo:block>
  47. </fo:table-cell>
  48. <fo:table-cell height="20pt" background-color="yellow">
  49. <fo:block>cell4</fo:block>
  50. </fo:table-cell>
  51. </fo:table-row>
  52. <fo:table-row>
  53. <fo:table-cell>
  54. <fo:block>cell5</fo:block>
  55. </fo:table-cell>
  56. <fo:table-cell block-progression-dimension="20pt" background-color="orange">
  57. <fo:block>cell6</fo:block>
  58. </fo:table-cell>
  59. </fo:table-row>
  60. <fo:table-row>
  61. <fo:table-cell>
  62. <fo:block>cell7</fo:block>
  63. </fo:table-cell>
  64. <fo:table-cell block-progression-dimension.minimum="20pt" block-progression-dimension.optimum="30pt" background-color="yellow">
  65. <fo:block line-height="8pt" font-size="8pt">
  66. <fo:block>cell8a</fo:block>
  67. <fo:block>cell8b</fo:block>
  68. <fo:block>cell8c</fo:block>
  69. </fo:block>
  70. </fo:table-cell>
  71. </fo:table-row>
  72. <fo:table-row>
  73. <fo:table-cell>
  74. <fo:block>cell9</fo:block>
  75. </fo:table-cell>
  76. <fo:table-cell block-progression-dimension.minimum="30pt" background-color="yellow">
  77. <fo:block line-height="8pt" font-size="8pt">
  78. <fo:block>cell10a</fo:block>
  79. <fo:block>cell10b</fo:block>
  80. <fo:block>cell10c</fo:block>
  81. </fo:block>
  82. </fo:table-cell>
  83. </fo:table-row>
  84. <fo:table-row>
  85. <fo:table-cell>
  86. <fo:block>cell11</fo:block>
  87. </fo:table-cell>
  88. <fo:table-cell block-progression-dimension.minimum="10pt" block-progression-dimension.optimum="20pt" background-color="orange">
  89. <fo:block line-height="8pt" font-size="8pt">
  90. <fo:block>cell12a</fo:block>
  91. <fo:block>cell12b</fo:block>
  92. <fo:block>cell12c</fo:block>
  93. </fo:block>
  94. </fo:table-cell>
  95. </fo:table-row>
  96. <fo:table-row>
  97. <fo:table-cell>
  98. <fo:block>cell13</fo:block>
  99. </fo:table-cell>
  100. <fo:table-cell block-progression-dimension.maximum="20pt" background-color="yellow">
  101. <fo:block line-height="8pt" font-size="8pt">
  102. <fo:block>cell14a</fo:block>
  103. <fo:block>cell14b</fo:block>
  104. <fo:block>cell14c</fo:block>
  105. </fo:block>
  106. </fo:table-cell>
  107. </fo:table-row>
  108. <fo:table-row>
  109. <fo:table-cell>
  110. <fo:block>cell15</fo:block>
  111. </fo:table-cell>
  112. <fo:table-cell>
  113. <fo:block>cell16</fo:block>
  114. </fo:table-cell>
  115. </fo:table-row>
  116. </fo:table-body>
  117. </fo:table>
  118. </fo:flow>
  119. </fo:page-sequence>
  120. </fo:root>
  121. </fo>
  122. <checks>
  123. <!-- cell 2 -->
  124. <eval expected="216000" xpath="//flow/block[1]/block[2]/@ipd"/>
  125. <eval expected="14400" xpath="//flow/block[1]/block[2]/@bpd"/>
  126. <eval expected="216000" xpath="//flow/block[1]/block[2]/block[1]/@ipd"/>
  127. <eval expected="14400" xpath="//flow/block[1]/block[2]/block[1]/@bpd"/>
  128. <!-- cell 4: height="20pt" -->
  129. <eval expected="color=#ffff00" xpath="//flow/block[1]/block[4]/@background"/>
  130. <eval expected="216000" xpath="//flow/block[1]/block[4]/@ipd"/>
  131. <eval expected="20000" xpath="//flow/block[1]/block[4]/@bpd"/>
  132. <eval expected="216000" xpath="//flow/block[1]/block[4]/block[1]/@ipd"/>
  133. <eval expected="14400" xpath="//flow/block[1]/block[4]/block[1]/@bpd"/>
  134. <!-- cell 6: block-progression-dimension="20pt" -->
  135. <eval expected="color=#ffa500" xpath="//flow/block[1]/block[6]/@background"/>
  136. <eval expected="216000" xpath="//flow/block[1]/block[6]/@ipd"/>
  137. <eval expected="20000" xpath="//flow/block[1]/block[6]/@bpd"/>
  138. <eval expected="216000" xpath="//flow/block[1]/block[6]/block[1]/@ipd"/>
  139. <eval expected="14400" xpath="//flow/block[1]/block[6]/block[1]/@bpd"/>
  140. <!-- cell 8: content-height is 24pt (3*8pt), min="20pt", opt="30pt" -->
  141. <eval expected="216000" xpath="//flow/block[1]/block[8]/@ipd"/>
  142. <eval expected="30000" xpath="//flow/block[1]/block[8]/@bpd"/>
  143. <eval expected="216000" xpath="//flow/block[1]/block[8]/block[1]/@ipd"/>
  144. <eval expected="24000" xpath="//flow/block[1]/block[8]/block[1]/@bpd"/>
  145. <!-- cell 10: content-height is 24pt (3*8pt), min="30pt" -->
  146. <eval expected="216000" xpath="//flow/block[1]/block[10]/@ipd"/>
  147. <eval expected="30000" xpath="//flow/block[1]/block[10]/@bpd"/>
  148. <eval expected="216000" xpath="//flow/block[1]/block[10]/block[1]/@ipd"/>
  149. <eval expected="24000" xpath="//flow/block[1]/block[10]/block[1]/@bpd"/>
  150. <!-- cell 12: content-height is 24pt (3*8pt), min="10pt", opt="20pt" -->
  151. <eval expected="216000" xpath="//flow/block[1]/block[12]/@ipd"/>
  152. <eval expected="24000" xpath="//flow/block[1]/block[12]/@bpd"/>
  153. <eval expected="216000" xpath="//flow/block[1]/block[12]/block[1]/@ipd"/>
  154. <eval expected="24000" xpath="//flow/block[1]/block[12]/block[1]/@bpd"/>
  155. <!-- cell 14: content-height is 24pt (3*8pt), max="20", contents force relaxing max constraint -->
  156. <!-- Check for the warning message in the log -->
  157. <eval expected="216000" xpath="//flow/block[1]/block[14]/@ipd"/>
  158. <eval expected="24000" xpath="//flow/block[1]/block[14]/@bpd"/>
  159. <eval expected="216000" xpath="//flow/block[1]/block[14]/block[1]/@ipd"/>
  160. <eval expected="24000" xpath="//flow/block[1]/block[14]/block[1]/@bpd"/>
  161. </checks>
  162. </testcase>