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.

footnote_in_list_2.xml 6.4KB

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 checks footnotes as descendants of list-item-body elements.
  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="simple" page-height="220pt" page-width="3in"
  27. margin="10pt">
  28. <fo:region-body background-color="#F0F0F0"/>
  29. </fo:simple-page-master>
  30. </fo:layout-master-set>
  31. <fo:page-sequence master-reference="simple" font-size="8pt" line-height="10pt">
  32. <fo:flow flow-name="xsl-region-body">
  33. <fo:block>Before the list.</fo:block>
  34. <fo:list-block provisional-distance-between-starts="1.2em" provisional-label-separation="2pt">
  35. <fo:list-item>
  36. <fo:list-item-label end-indent="label-end()">
  37. <fo:block>–</fo:block>
  38. </fo:list-item-label>
  39. <fo:list-item-body start-indent="body-start()">
  40. <fo:block>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque<fo:footnote>
  41. <fo:inline>(1)</fo:inline>
  42. <fo:footnote-body>
  43. <fo:block start-indent="0">
  44. <fo:inline>(1)</fo:inline> First footnote from the list.</fo:block>
  45. </fo:footnote-body>
  46. </fo:footnote> hendrerit euismod velit. Nulla facilisi. Etiam et risus at neque ultrices
  47. facilisis. Donec lectus est, nonummy quis, rhoncus bibendum, porta at, nisl<fo:footnote>
  48. <fo:inline>(2)</fo:inline>
  49. <fo:footnote-body>
  50. <fo:block start-indent="0">
  51. <fo:inline>(2)</fo:inline> Second footnote from the list.</fo:block>
  52. </fo:footnote-body>
  53. </fo:footnote>.
  54. </fo:block>
  55. </fo:list-item-body>
  56. </fo:list-item>
  57. <fo:list-item>
  58. <fo:list-item-label end-indent="label-end()">
  59. <fo:block>–</fo:block>
  60. </fo:list-item-label>
  61. <fo:list-item-body start-indent="body-start()">
  62. <fo:block>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque<fo:footnote>
  63. <fo:inline>(3)</fo:inline>
  64. <fo:footnote-body>
  65. <fo:block start-indent="0">
  66. <fo:inline>(3)</fo:inline> Third footnote from the list.</fo:block>
  67. </fo:footnote-body>
  68. </fo:footnote> hendrerit euismod velit. Nulla facilisi. Etiam et risus at neque ultrices
  69. facilisis. Donec lectus est, nonummy quis, rhoncus bibendum, porta at, nisl<fo:footnote>
  70. <fo:inline>(4)</fo:inline>
  71. <fo:footnote-body>
  72. <fo:block start-indent="0">
  73. <fo:inline>(4)</fo:inline> Fourth footnote from the list.</fo:block>
  74. </fo:footnote-body>
  75. </fo:footnote>.
  76. </fo:block>
  77. </fo:list-item-body>
  78. </fo:list-item>
  79. </fo:list-block>
  80. </fo:flow>
  81. </fo:page-sequence>
  82. <fo:page-sequence master-reference="simple" font-size="8pt" line-height="10pt">
  83. <fo:flow flow-name="xsl-region-body">
  84. <fo:block space-after="130pt">Before the list.</fo:block>
  85. <fo:list-block provisional-distance-between-starts="1.2em" provisional-label-separation="2pt">
  86. <fo:list-item>
  87. <fo:list-item-label end-indent="label-end()">
  88. <fo:block>–</fo:block>
  89. </fo:list-item-label>
  90. <fo:list-item-body start-indent="body-start()">
  91. <fo:block orphans="1" widows="1">Lorem ipsum dolor sit amet, consectetuer adipiscing
  92. elit. Pellentesque<fo:footnote>
  93. <fo:inline>(1)</fo:inline>
  94. <fo:footnote-body>
  95. <fo:block start-indent="0">(1) First footnote from the list.</fo:block>
  96. </fo:footnote-body>
  97. </fo:footnote> hendrerit euismod velit. Nulla facilisi. Etiam et risus at neque ultrices
  98. facilisis. Donec lectus est, nonummy quis, rhoncus bibendum, porta at, nisl<fo:footnote>
  99. <fo:inline>(2)</fo:inline>
  100. <fo:footnote-body>
  101. <fo:block start-indent="0">(2) Second footnote from the list.</fo:block>
  102. </fo:footnote-body>
  103. </fo:footnote>.
  104. </fo:block>
  105. </fo:list-item-body>
  106. </fo:list-item>
  107. </fo:list-block>
  108. </fo:flow>
  109. </fo:page-sequence>
  110. </fo:root>
  111. </fo>
  112. <checks>
  113. <eval expected="4" xpath="count(//pageSequence[1]//footnote/block)"/>
  114. <eval expected="(1) First footnote from the list." xpath="//pageSequence[1]//footnote/block[1]"/>
  115. <eval expected="(2) Second footnote from the list." xpath="//pageSequence[1]//footnote/block[2]"/>
  116. <eval expected="(3) Third footnote from the list." xpath="//pageSequence[1]//footnote/block[3]"/>
  117. <eval expected="(4) Fourth footnote from the list." xpath="//pageSequence[1]//footnote/block[4]"/>
  118. <eval expected="1" xpath="count(//pageSequence[2]/pageViewport[1]//footnote/block)"/>
  119. <eval expected="(1) First footnote from the list." xpath="//pageSequence[2]/pageViewport[1]//footnote/block"/>
  120. <eval expected="1" xpath="count(//pageSequence[2]/pageViewport[2]//footnote/block)"/>
  121. <eval expected="(2) Second footnote from the list." xpath="//pageSequence[2]/pageViewport[2]//footnote/block"/>
  122. </checks>
  123. </testcase>