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.

inline_alignment-baseline_4.xml 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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 inline level alignment-baseline for nested inlines.
  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" font-family="sans-serif">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  33. <fo:inline font-size="50%"
  34. background-color="yellow">alphabetic
  35. <fo:inline font-size="150%" background-color="red">alphabetic</fo:inline>
  36. </fo:inline>
  37. Big <fo:inline font-size="8pt">Baseline table unchanged</fo:inline>
  38. </fo:block>
  39. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  40. <fo:inline font-size="50%"
  41. dominant-baseline="reset-size"
  42. background-color="yellow">alphabetic
  43. <fo:inline font-size="150%" background-color="red">alphabetic</fo:inline>
  44. </fo:inline>
  45. Big <fo:inline font-size="8pt">Baseline table changed</fo:inline>
  46. </fo:block>
  47. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  48. <fo:inline font-size="50%"
  49. alignment-baseline="hanging"
  50. background-color="yellow">hanging
  51. <fo:inline font-size="50%" background-color="red" alignment-baseline="middle">middle</fo:inline>
  52. </fo:inline>
  53. Big <fo:inline font-size="8pt">Baseline table unchanged</fo:inline>
  54. </fo:block>
  55. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  56. <fo:inline font-size="50%"
  57. dominant-baseline="reset-size"
  58. alignment-baseline="hanging"
  59. background-color="yellow">hanging
  60. <fo:inline font-size="50%" background-color="red" alignment-baseline="middle">middle</fo:inline>
  61. </fo:inline>
  62. Big <fo:inline font-size="8pt">Baseline table changed</fo:inline>
  63. </fo:block>
  64. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  65. <fo:inline font-size="50%"
  66. alignment-baseline="text-before-edge"
  67. background-color="yellow">text-before-edge
  68. <fo:inline font-size="150%" background-color="red" alignment-baseline="after-edge">after-edge</fo:inline>
  69. </fo:inline>
  70. Big <fo:inline font-size="8pt">Baseline table unchanged</fo:inline>
  71. </fo:block>
  72. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  73. <fo:inline font-size="50%"
  74. dominant-baseline="reset-size"
  75. alignment-baseline="text-before-edge"
  76. background-color="yellow">text-before-edge
  77. <fo:inline font-size="150%" background-color="red" alignment-baseline="after-edge">after-edge</fo:inline>
  78. </fo:inline>
  79. Big <fo:inline font-size="8pt">Baseline table changed</fo:inline>
  80. </fo:block>
  81. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  82. <fo:inline font-size="25%"
  83. alignment-baseline="central"
  84. background-color="yellow">central
  85. <fo:inline font-size="150%"
  86. alignment-baseline="text-before-edge"
  87. background-color="red">text-before-edge
  88. <fo:inline font-size="200%" background-color="green">alphabetic</fo:inline>
  89. </fo:inline>
  90. </fo:inline>
  91. Big <fo:inline font-size="8pt">Baseline table unchanged</fo:inline>
  92. </fo:block>
  93. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  94. <fo:inline font-size="25%"
  95. dominant-baseline="reset-size"
  96. alignment-baseline="central"
  97. background-color="yellow">central
  98. <fo:inline font-size="150%"
  99. alignment-baseline="text-before-edge"
  100. background-color="red">text-before-edge
  101. <fo:inline font-size="200%" background-color="green">alphabetic</fo:inline>
  102. </fo:inline>
  103. </fo:inline>
  104. Big <fo:inline font-size="8pt">Baseline table changed</fo:inline>
  105. </fo:block>
  106. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  107. <fo:inline font-size="25%"
  108. dominant-baseline="reset-size"
  109. alignment-baseline="central"
  110. background-color="yellow">central
  111. <fo:inline font-size="150%"
  112. dominant-baseline="reset-size"
  113. alignment-baseline="text-before-edge"
  114. background-color="red">text-before-edge
  115. <fo:inline font-size="200%" background-color="green">alphabetic</fo:inline>
  116. </fo:inline>
  117. </fo:inline>
  118. Big <fo:inline font-size="8pt">Baseline table changed twice</fo:inline>
  119. </fo:block>
  120. <fo:block background-color="silver" margin="1pt 0pt 1pt 0pt" font-size="24pt">Big
  121. <fo:inline font-size="50%"
  122. dominant-baseline="reset-size"
  123. alignment-baseline="before-edge"
  124. background-color="yellow">before-edge
  125. <fo:inline font-size="150%" background-color="red" alignment-baseline="after-edge">after-edge</fo:inline>
  126. </fo:inline>
  127. Big <fo:inline font-size="8pt">This is over constraint</fo:inline>
  128. </fo:block>
  129. </fo:flow>
  130. </fo:page-sequence>
  131. </fo:root>
  132. </fo>
  133. <checks>
  134. <eval expected="22200" xpath="//flow/block[1]/lineArea[1]/@bpd"/>
  135. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[1]/@offset"/>
  136. <eval expected="8616" xpath="//flow/block[1]/lineArea[1]/inlineparent/@offset"/>
  137. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[1]/@offset"/>
  138. <eval expected="-4308" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  139. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
  140. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/inlineparent/text[2]/@offset"/>
  141. <eval expected="0" xpath="//flow/block[1]/lineArea[1]/text[2]/@offset"/>
  142. <eval expected="22200" xpath="//flow/block[2]/lineArea[1]/@bpd"/>
  143. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[1]/@offset"/>
  144. <eval expected="8616" xpath="//flow/block[2]/lineArea[1]/inlineparent/@offset"/>
  145. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[1]/@offset"/>
  146. <eval expected="-4308" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  147. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
  148. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/inlineparent/text[2]/@offset"/>
  149. <eval expected="0" xpath="//flow/block[2]/lineArea[1]/text[2]/@offset"/>
  150. <eval expected="22200" xpath="//flow/block[3]/lineArea[1]/@bpd"/>
  151. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[1]/@offset"/>
  152. <eval expected="1723" xpath="//flow/block[3]/lineArea[1]/inlineparent/@offset"/>
  153. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[1]/@offset"/>
  154. <eval expected="6494" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  155. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
  156. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/inlineparent/text[2]/@offset"/>
  157. <eval expected="0" xpath="//flow/block[3]/lineArea[1]/text[2]/@offset"/>
  158. <eval expected="22200" xpath="//flow/block[4]/lineArea[1]/@bpd"/>
  159. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[1]/@offset"/>
  160. <eval expected="1723" xpath="//flow/block[4]/lineArea[1]/inlineparent/@offset"/>
  161. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[1]/@offset"/>
  162. <eval expected="2739" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  163. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
  164. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/inlineparent/text[2]/@offset"/>
  165. <eval expected="0" xpath="//flow/block[4]/lineArea[1]/text[2]/@offset"/>
  166. <eval expected="22200" xpath="//flow/block[5]/lineArea[1]/@bpd"/>
  167. <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[1]/@offset"/>
  168. <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
  169. <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[1]/@offset"/>
  170. <eval expected="5550" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  171. <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
  172. <eval expected="0" xpath="//flow/block[5]/lineArea[1]/inlineparent/text[2]/@offset"/>
  173. <eval expected="0" xpath="//flow/block[5]/lineArea[1]/text[2]/@offset"/>
  174. <eval expected="27750" xpath="//flow/block[6]/lineArea[1]/@bpd"/>
  175. <eval expected="5550" xpath="//flow/block[6]/lineArea[1]/text[1]/@offset"/>
  176. <eval expected="5550" xpath="//flow/block[6]/lineArea[1]/inlineparent/@offset"/>
  177. <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[1]/@offset"/>
  178. <eval expected="-5550" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  179. <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
  180. <eval expected="0" xpath="//flow/block[6]/lineArea[1]/inlineparent/text[2]/@offset"/>
  181. <eval expected="5550" xpath="//flow/block[6]/lineArea[1]/text[2]/@offset"/>
  182. <eval expected="22200" xpath="//flow/block[7]/lineArea[1]/@bpd"/>
  183. <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[1]/@offset"/>
  184. <eval expected="8325" xpath="//flow/block[7]/lineArea[1]/inlineparent/@offset"/>
  185. <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/text[1]/@offset"/>
  186. <eval expected="-8325" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  187. <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
  188. <eval expected="4308" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
  189. <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
  190. <eval expected="0" xpath="//flow/block[7]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
  191. <eval expected="0" xpath="//flow/block[7]/lineArea[1]/text[2]/@offset"/>
  192. <eval expected="22491" xpath="//flow/block[8]/lineArea[1]/@bpd"/>
  193. <eval expected="291" xpath="//flow/block[8]/lineArea[1]/text[1]/@offset"/>
  194. <eval expected="8616" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
  195. <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/text[1]/@offset"/>
  196. <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  197. <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
  198. <eval expected="-8616" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
  199. <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
  200. <eval expected="0" xpath="//flow/block[8]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
  201. <eval expected="291" xpath="//flow/block[8]/lineArea[1]/text[2]/@offset"/>
  202. <eval expected="22200" xpath="//flow/block[9]/lineArea[1]/@bpd"/>
  203. <eval expected="0" xpath="//flow/block[9]/lineArea[1]/text[1]/@offset"/>
  204. <eval expected="8325" xpath="//flow/block[9]/lineArea[1]/inlineparent/@offset"/>
  205. <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/text[1]/@offset"/>
  206. <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  207. <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/text[1]/@offset"/>
  208. <eval expected="-6462" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/inlineparent/@offset"/>
  209. <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/inlineparent/text/@offset"/>
  210. <eval expected="0" xpath="//flow/block[9]/lineArea[1]/inlineparent/inlineparent/text[2]/@offset"/>
  211. <eval expected="0" xpath="//flow/block[9]/lineArea[1]/text[2]/@offset"/>
  212. <eval expected="27750" xpath="//flow/block[10]/lineArea[1]/@bpd"/>
  213. <eval expected="5550" xpath="//flow/block[10]/lineArea[1]/text[1]/@offset"/>
  214. <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/@offset"/>
  215. <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/text[1]/@offset"/>
  216. <eval expected="-5550" xpath="//flow/block[10]/lineArea[1]/inlineparent/inlineparent/@offset"/>
  217. <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/inlineparent/text/@offset"/>
  218. <eval expected="0" xpath="//flow/block[10]/lineArea[1]/inlineparent/text[2]/@offset"/>
  219. <eval expected="5550" xpath="//flow/block[10]/lineArea[1]/text[2]/@offset"/>
  220. </checks>
  221. </testcase>