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.

leader_toc.xml 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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 fo:leader in a typical table of content scenario.
  21. This example is taken from the spec section 6.6.1.1.4
  22. </p>
  23. </info>
  24. <fo>
  25. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  26. <fo:layout-master-set>
  27. <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
  28. <fo:region-body/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="normal" white-space-collapse="true"
  32. initial-page-number="9">
  33. <fo:flow flow-name="xsl-region-body">
  34. <fo:block text-align-last="justify">
  35. <fo:basic-link internal-destination="N4">1. Chapter</fo:basic-link>
  36. <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
  37. leader-length.maximum="100%" leader-pattern="dots">
  38. </fo:leader>
  39. <fo:page-number-citation ref-id="N4">
  40. </fo:page-number-citation>
  41. </fo:block>
  42. <fo:block start-indent="10mm" text-align-last="justify">
  43. <fo:basic-link internal-destination="N11">1.1 Section</fo:basic-link>
  44. <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
  45. leader-length.maximum="100%" leader-pattern="dots">
  46. </fo:leader>
  47. <fo:page-number-citation ref-id="N11">
  48. </fo:page-number-citation>
  49. </fo:block>
  50. <fo:block start-indent="10mm" text-align-last="justify">
  51. <fo:basic-link internal-destination="N19">1.2 Section</fo:basic-link>
  52. <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
  53. leader-length.maximum="100%" leader-pattern="dots">
  54. </fo:leader>
  55. <fo:page-number-citation ref-id="N19">
  56. </fo:page-number-citation>
  57. </fo:block>
  58. <fo:block text-align-last="justify">
  59. <fo:basic-link internal-destination="N28">2. Chapter</fo:basic-link>
  60. <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
  61. leader-length.maximum="100%" leader-pattern="dots">
  62. </fo:leader>
  63. <fo:page-number-citation ref-id="N28">
  64. </fo:page-number-citation>
  65. </fo:block>
  66. <fo:block start-indent="10mm" text-align-last="justify">
  67. <fo:basic-link internal-destination="N35">2.1 Section</fo:basic-link>
  68. <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
  69. leader-length.maximum="100%" leader-pattern="dots">
  70. </fo:leader>
  71. <fo:page-number-citation ref-id="N35">
  72. </fo:page-number-citation>
  73. </fo:block>
  74. <fo:block start-indent="10mm" text-align-last="justify">
  75. <fo:basic-link internal-destination="N43">2.2 Section</fo:basic-link>
  76. <fo:leader leader-length.minimum="12pt" leader-length.optimum="40pt"
  77. leader-length.maximum="100%" leader-pattern="dots">
  78. </fo:leader>
  79. <fo:page-number-citation ref-id="N43">
  80. </fo:page-number-citation>
  81. </fo:block>
  82. <fo:block id="N4">1. Chapter
  83. </fo:block>
  84. <fo:block>Text
  85. </fo:block>
  86. <fo:block id="N11">1.1 Section
  87. </fo:block>
  88. <fo:block>Text
  89. </fo:block>
  90. <fo:block id="N19">1.2 Section
  91. </fo:block>
  92. <fo:block>Text
  93. </fo:block>
  94. <fo:block id="N28" break-before="page">2. Chapter
  95. </fo:block>
  96. <fo:block>Text
  97. </fo:block>
  98. <fo:block id="N35">2.1 Section
  99. </fo:block>
  100. <fo:block>Text
  101. </fo:block>
  102. <fo:block id="N43">2.2 Section
  103. </fo:block>
  104. <fo:block>Text
  105. </fo:block>
  106. </fo:flow>
  107. </fo:page-sequence>
  108. </fo:root>
  109. </fo>
  110. <checks>
  111. <eval expected="11100" xpath="//flow/block[1]/lineArea/@bpd"/>
  112. <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/>
  113. <eval expected="286768" xpath="//flow/block[1]/lineArea/inlineparent[2]/@ipd"/>
  114. <eval expected="5280" xpath="//flow/block[1]/lineArea/inlineparent[2]/@offset"/>
  115. <eval expected="11100" xpath="//flow/block[2]/lineArea/@bpd"/>
  116. <eval expected="331654" xpath="//flow/block[2]/lineArea/@ipd"/>
  117. <eval expected="254591" xpath="//flow/block[2]/lineArea/inlineparent[2]/@ipd"/>
  118. <eval expected="5280" xpath="//flow/block[2]/lineArea/inlineparent[2]/@offset"/>
  119. <eval expected="11100" xpath="//flow/block[3]/lineArea/@bpd"/>
  120. <eval expected="331654" xpath="//flow/block[3]/lineArea/@ipd"/>
  121. <eval expected="254591" xpath="//flow/block[3]/lineArea/inlineparent[2]/@ipd"/>
  122. <eval expected="5280" xpath="//flow/block[3]/lineArea/inlineparent[2]/@offset"/>
  123. <eval expected="11100" xpath="//flow/block[4]/lineArea/@bpd"/>
  124. <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/>
  125. <eval expected="280199" xpath="//flow/block[4]/lineArea/inlineparent[2]/@ipd"/>
  126. <eval expected="5280" xpath="//flow/block[4]/lineArea/inlineparent[2]/@offset"/>
  127. <eval expected="11100" xpath="//flow/block[5]/lineArea/@bpd"/>
  128. <eval expected="331654" xpath="//flow/block[5]/lineArea/@ipd"/>
  129. <eval expected="248032" xpath="//flow/block[5]/lineArea/inlineparent[2]/@ipd"/>
  130. <eval expected="5280" xpath="//flow/block[5]/lineArea/inlineparent[2]/@offset"/>
  131. <eval expected="11100" xpath="//flow/block[6]/lineArea/@bpd"/>
  132. <eval expected="331654" xpath="//flow/block[6]/lineArea/@ipd"/>
  133. <eval expected="248032" xpath="//flow/block[6]/lineArea/inlineparent[2]/@ipd"/>
  134. <eval expected="5280" xpath="//flow/block[6]/lineArea/inlineparent[2]/@offset"/>
  135. </checks>
  136. </testcase>