您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

table_writing-mode_rl.xml 4.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 header, footer, and body cells all respect writing-mode="rl" specified on table. See also Bugzilla #53086.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
  27. <fo:region-body margin-top="3cm"/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="first">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block-container writing-mode="rl-tb">
  33. <fo:table table-layout="fixed" width="100%" border-collapse="collapse">
  34. <fo:table-header>
  35. <fo:table-row>
  36. <fo:table-cell border="solid 1px black">
  37. <fo:block>HEADER ROW</fo:block>
  38. </fo:table-cell>
  39. <fo:table-cell border="solid 1px black">
  40. <fo:block><fo:bidi-override unicode-bidi="bidi-override" direction="rtl">ABC</fo:bidi-override></fo:block>
  41. </fo:table-cell>
  42. <fo:table-cell border="solid 1px black">
  43. <fo:block><fo:bidi-override unicode-bidi="bidi-override" direction="rtl">DEF</fo:bidi-override></fo:block>
  44. </fo:table-cell>
  45. </fo:table-row>
  46. </fo:table-header>
  47. <fo:table-footer>
  48. <fo:table-row>
  49. <fo:table-cell border="solid 1px black">
  50. <fo:block>FOOTER ROW</fo:block>
  51. </fo:table-cell>
  52. <fo:table-cell border="solid 1px black">
  53. <fo:block><fo:bidi-override unicode-bidi="bidi-override" direction="rtl">ABC</fo:bidi-override></fo:block>
  54. </fo:table-cell>
  55. <fo:table-cell border="solid 1px black">
  56. <fo:block><fo:bidi-override unicode-bidi="bidi-override" direction="rtl">DEF</fo:bidi-override></fo:block>
  57. </fo:table-cell>
  58. </fo:table-row>
  59. </fo:table-footer>
  60. <fo:table-body>
  61. <fo:table-row>
  62. <fo:table-cell border="solid 1px black">
  63. <fo:block>BODY ROW</fo:block>
  64. </fo:table-cell>
  65. <fo:table-cell border="solid 1px black">
  66. <fo:block><fo:bidi-override unicode-bidi="bidi-override" direction="rtl">ABC</fo:bidi-override></fo:block>
  67. </fo:table-cell>
  68. <fo:table-cell border="solid 1px black">
  69. <fo:block><fo:bidi-override unicode-bidi="bidi-override" direction="rtl">DEF</fo:bidi-override></fo:block>
  70. </fo:table-cell>
  71. </fo:table-row>
  72. </fo:table-body>
  73. </fo:table>
  74. </fo:block-container>
  75. </fo:flow>
  76. </fo:page-sequence>
  77. </fo:root>
  78. </fo>
  79. <checks>
  80. <eval expected="9" xpath="count(//lineArea)"/>
  81. <eval expected="HEADER ROWCBAFEDBODY ROWCBAFEDFOOTER ROWCBAFED" xpath="/"/>
  82. <eval expected="HEADER ROW" xpath="//flow/block/block/block/block[1]//lineArea"/>
  83. <eval expected="1" xpath="//flow/block/block/block/block[1]//lineArea/@level"/>
  84. <eval expected="BODY ROW" xpath="//flow/block/block/block/block[4]//lineArea"/>
  85. <eval expected="1" xpath="//flow/block/block/block/block[4]//lineArea/@level"/>
  86. <eval expected="FOOTER ROW" xpath="//flow/block/block/block/block[7]//lineArea"/>
  87. <eval expected="1" xpath="//flow/block/block/block/block[7]//lineArea/@level"/>
  88. </checks>
  89. </testcase>