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.

bidi_propagation_1.xml 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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 verifies correct propagation of bidi resolution. It is based upon skynav/fop
  21. ticket #78.
  22. [TBD] The test input file could be further simplified.
  23. [TBD] Add fop bug corresponding to above ticket then change the above reference.
  24. </p>
  25. </info>
  26. <fo>
  27. <fo:root xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format">
  28. <fo:layout-master-set>
  29. <fo:simple-page-master master-name="odd" page-height="279.40mm" page-width="215.90mm">
  30. <fo:region-body region-name="body" margin="22.00mm 21.59mm 20.00mm 38.86mm"/>
  31. <fo:region-after region-name="odd-footer" extent="20.00mm"/>
  32. </fo:simple-page-master>
  33. <fo:simple-page-master master-name="even" page-height="279.40mm" page-width="215.90mm">
  34. <fo:region-body region-name="body" margin="22.00mm 38.86mm 20.00mm 21.59mm"/>
  35. <fo:region-after region-name="even-footer" extent="20.00mm"/>
  36. </fo:simple-page-master>
  37. <fo:page-sequence-master master-name="document">
  38. <fo:repeatable-page-master-alternatives>
  39. <fo:conditional-page-master-reference master-reference="odd" odd-or-even="odd"/>
  40. <fo:conditional-page-master-reference master-reference="even" odd-or-even="even"/>
  41. </fo:repeatable-page-master-alternatives>
  42. </fo:page-sequence-master>
  43. </fo:layout-master-set>
  44. <fo:page-sequence master-reference="document">
  45. <fo:flow flow-name="body" line-height="1.1">
  46. <fo:block>
  47. <fo:list-block provisional-distance-between-starts="4mm" space-after="5mm">
  48. <fo:list-item padding-bottom="2mm">
  49. <fo:list-item-label>
  50. <fo:block>•
  51. </fo:block>
  52. </fo:list-item-label>
  53. <fo:list-item-body start-indent="body-start()">
  54. <fo:block>
  55. <fo:block orphans="2" widows="2" space-after="3mm" keep-with-next.within-column="always">
  56. Test
  57. </fo:block>
  58. <fo:table keep-together.within-column="always" width="100%" table-layout="fixed" space-after="5mm" margin-left="1mm" space-before="0mm">
  59. <fo:table-column column-width="20%"/>
  60. <fo:table-column column-width="7%"/>
  61. <fo:table-column column-width="proportional-column-width(1)"/>
  62. <fo:table-body>
  63. <fo:table-row height="7mm">
  64. <fo:table-cell margin-left="0" text-align="right">
  65. <fo:block>
  66. <fo:inline>
  67. <fo:inline><fo:bidi-override unicode-bidi="bidi-override" direction="rtl">XY</fo:bidi-override></fo:inline>
  68. </fo:inline>
  69. </fo:block>
  70. </fo:table-cell>
  71. </fo:table-row>
  72. </fo:table-body>
  73. </fo:table>
  74. </fo:block>
  75. </fo:list-item-body>
  76. </fo:list-item>
  77. <fo:list-item padding-bottom="2mm">
  78. <fo:list-item-label>
  79. <fo:block>•
  80. </fo:block>
  81. </fo:list-item-label>
  82. <fo:list-item-body start-indent="body-start()">
  83. <fo:block>
  84. Test
  85. <fo:table keep-together.within-column="always" width="100%" table-layout="fixed" space-after="5mm" margin-left="1mm" space-before="0mm">
  86. <fo:table-column column-width="20%"/>
  87. <fo:table-column column-width="7%"/>
  88. <fo:table-column column-width="proportional-column-width(1)"/>
  89. <fo:table-body>
  90. <fo:table-row height="7mm">
  91. <fo:table-cell margin-left="0" text-align="right">
  92. <fo:block>
  93. <fo:inline>
  94. <fo:inline><fo:bidi-override unicode-bidi="bidi-override" direction="rtl">XY</fo:bidi-override></fo:inline>
  95. </fo:inline>
  96. </fo:block>
  97. </fo:table-cell>
  98. </fo:table-row>
  99. </fo:table-body>
  100. </fo:table>
  101. </fo:block>
  102. </fo:list-item-body>
  103. </fo:list-item>
  104. </fo:list-block>
  105. </fo:block>
  106. <fo:block id="final"/>
  107. </fo:flow>
  108. </fo:page-sequence>
  109. </fo:root>
  110. </fo>
  111. <checks>
  112. <eval expected="6" xpath="count(//word)"/>
  113. <true xpath="not(/descendant::word[1]/@level)"/>
  114. <true xpath="not(/descendant::word[2]/@level)"/>
  115. <eval expected="1" xpath="/descendant::word[3]/@level"/>
  116. <eval expected="true" xpath="/descendant::word[3]/@reversed"/>
  117. <true xpath="not(/descendant::word[4]/@level)"/>
  118. <true xpath="not(/descendant::word[5]/@level)"/>
  119. <eval expected="1" xpath="/descendant::word[6]/@level"/>
  120. <eval expected="true" xpath="/descendant::word[6]/@reversed"/>
  121. </checks>
  122. </testcase>