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-column_column-progression-rl_1.xml 3.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 table column progression with right-to-left writing mode when writing-mode
  21. is specified on fo:page-sequence. The first column should be to the right of the second column; the
  22. second column should be to the right of the third column. The columns should be colored red,
  23. yellow, orange from right to left.
  24. </p>
  25. </info>
  26. <fo>
  27. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  28. <fo:layout-master-set>
  29. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="0.5in">
  30. <fo:region-body/>
  31. </fo:simple-page-master>
  32. </fo:layout-master-set>
  33. <fo:page-sequence master-reference="normal" writing-mode="rl">
  34. <fo:flow flow-name="xsl-region-body">
  35. <fo:table table-layout="fixed" width="100%">
  36. <fo:table-column column-width="1in" background-color="red"/>
  37. <fo:table-column column-width="1in" background-color="yellow"/>
  38. <fo:table-column column-width="2in" background-color="orange"/>
  39. <fo:table-body>
  40. <fo:table-row>
  41. <fo:table-cell>
  42. <fo:block>cell1</fo:block>
  43. </fo:table-cell>
  44. <fo:table-cell>
  45. <fo:block>cell2</fo:block>
  46. </fo:table-cell>
  47. <fo:table-cell>
  48. <fo:block>cell3</fo:block>
  49. </fo:table-cell>
  50. </fo:table-row>
  51. </fo:table-body>
  52. </fo:table>
  53. </fo:flow>
  54. </fo:page-sequence>
  55. </fo:root>
  56. </fo>
  57. <checks>
  58. <!-- cell 1 background -->
  59. <eval expected="#ff0000" xpath="//flow/block[1]/block[1]/@bkg-color"/>
  60. <!-- cell 1 -->
  61. <eval expected="cell1" xpath="//flow/block[1]/block[2]/block[1]/lineArea/text"/>
  62. <eval expected="72000" xpath="//flow/block[1]/block[2]/@ipd"/>
  63. <eval expected="216000" xpath="//flow/block[1]/block[2]/@left-offset"/>
  64. <!-- cell 2 background -->
  65. <eval expected="#ffff00" xpath="//flow/block[1]/block[3]/@bkg-color"/>
  66. <!-- cell 2 -->
  67. <eval expected="cell2" xpath="//flow/block[1]/block[4]/block[1]/lineArea/text"/>
  68. <eval expected="72000" xpath="//flow/block[1]/block[4]/@ipd"/>
  69. <eval expected="144000" xpath="//flow/block[1]/block[4]/@left-offset"/>
  70. <!-- cell 3 background -->
  71. <eval expected="#ffa500" xpath="//flow/block[1]/block[5]/@bkg-color"/>
  72. <!-- cell 3 -->
  73. <eval expected="cell3" xpath="//flow/block[1]/block[6]/block[1]/lineArea/text"/>
  74. <eval expected="144000" xpath="//flow/block[1]/block[6]/@ipd"/>
  75. <true xpath="not(boolean(//flow/block[1]/block[6]/@left-offset))"/>
  76. <!-- right-to-left offset invariant - cell 2 to the left of cell 1 -->
  77. <true xpath="//flow/block[1]/block[4]/@left-offset &lt; //flow/block[1]/block[2]/@left-offset"/>
  78. <!-- right-to-left offset invariant - cell 3 to left right of cell 2 -->
  79. <true xpath="//flow/block[1]/block[4]/@left-offset &gt; 0"/>
  80. </checks>
  81. </testcase>