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_jira1749.xml 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. FOP-1749: footnotes with margin-top="..." that do not fit on the current
  21. page, but would've fit without top margin cause FOP to hang (instead of
  22. being pushed to the next page). Also, verify the top-offset for the
  23. footnote is calculated properly with margin-top.
  24. </p>
  25. </info>
  26. <fo>
  27. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  28. <fo:layout-master-set>
  29. <fo:simple-page-master page-height="50pt" page-width="240pt" master-name="Body">
  30. <fo:region-body/>
  31. </fo:simple-page-master>
  32. </fo:layout-master-set>
  33. <fo:page-sequence master-reference="Body">
  34. <fo:flow flow-name="xsl-region-body" font-size="10pt">
  35. <fo:block>No footnote</fo:block>
  36. <fo:block>Footnote call<fo:footnote>
  37. <fo:inline>*</fo:inline>
  38. <fo:footnote-body>
  39. <fo:block margin-top="20pt">The footnote</fo:block>
  40. </fo:footnote-body>
  41. </fo:footnote>
  42. </fo:block>
  43. </fo:flow>
  44. </fo:page-sequence>
  45. </fo:root>
  46. </fo>
  47. <checks>
  48. <!-- The block with footnote reference is on page 2 -->
  49. <eval expected="Footnote call" xpath="//pageViewport[2]//mainReference//text"/>
  50. <eval expected="The footnote" xpath="//pageViewport[2]//footnote//text"/>
  51. <!-- And footnote's top-offset positions it on the page, not below -->
  52. <eval expected="18000" xpath="//pageViewport[2]//footnote/@top-offset"/>
  53. </checks>
  54. </testcase>