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_basic.xml 4.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.
  21. </p>
  22. </info>
  23. <fo>
  24. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
  25. <fo:layout-master-set>
  26. <fo:simple-page-master master-name="normal" page-width="5in" page-height="3in">
  27. <fo:region-body/>
  28. </fo:simple-page-master>
  29. </fo:layout-master-set>
  30. <fo:page-sequence master-reference="normal" white-space-collapse="true">
  31. <fo:flow flow-name="xsl-region-body">
  32. <fo:block>This is a block with a footnote<fo:footnote><fo:inline font-size="50%" vertical-align="top">1</fo:inline><fo:footnote-body><fo:block><fo:inline font-size="50%" vertical-align="top">1</fo:inline>I'm a footnote!</fo:block></fo:footnote-body></fo:footnote> in it.</fo:block>
  33. <fo:block>This is another block without a footnote.</fo:block>
  34. <fo:block>filling 1...</fo:block>
  35. <fo:block background-color="yellow">filling 2...</fo:block>
  36. <fo:block>filling 3...</fo:block>
  37. <fo:block background-color="yellow">filling 4...</fo:block>
  38. <fo:block>filling 5...</fo:block>
  39. <fo:block background-color="yellow">filling 6...</fo:block>
  40. <fo:block>filling 7...</fo:block>
  41. <fo:block background-color="yellow">filling 8...</fo:block>
  42. <fo:block>filling 9...</fo:block>
  43. <fo:block background-color="yellow">filling 10...</fo:block>
  44. <fo:block>filling 11...</fo:block>
  45. <fo:block background-color="yellow">filling 12...</fo:block>
  46. <fo:block>filling 13...</fo:block>
  47. <fo:block background-color="yellow">filling 14...</fo:block>
  48. <fo:block>filling 15...</fo:block>
  49. <fo:block background-color="yellow">filling 16...</fo:block>
  50. <fo:block>filling 17...</fo:block>
  51. <fo:block background-color="yellow">filling 18...</fo:block>
  52. <fo:block>filling 19...</fo:block>
  53. <fo:block background-color="yellow">filling 20...</fo:block>
  54. <fo:block>filling 21...</fo:block>
  55. <fo:block background-color="yellow">filling 22...</fo:block>
  56. <fo:block>filling 23...</fo:block>
  57. </fo:flow>
  58. </fo:page-sequence>
  59. </fo:root>
  60. </fo>
  61. <checks>
  62. <eval expected="2" xpath="count(//pageViewport)"/>
  63. <!-- block with footnote -->
  64. <eval expected="This is a block with a footnote" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea/text[1]"/>
  65. <eval expected="1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea/inlineparent/text"/>
  66. <eval expected="6000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea/inlineparent/text/@font-size"/>
  67. <eval expected=" in it." xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea/text[2]"/>
  68. <!-- the footnote -->
  69. <eval expected="201600" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/@top-offset"/>
  70. <eval expected="360000" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/@ipd"/>
  71. <eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/@bpd"/>
  72. <eval expected="11100" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/@bpd"/>
  73. <eval expected="1" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/inlineparent/text"/>
  74. <eval expected="6000" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/inlineparent/text/@font-size"/>
  75. <eval expected="I'm a footnote!" xpath="//pageViewport[1]/page/regionViewport/regionBody/footnote/block[1]/lineArea/text[1]"/>
  76. <!-- page break checks -->
  77. <eval expected="filling 12..." xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[last()]/lineArea"/>
  78. <eval expected="filling 13..." xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/lineArea"/>
  79. </checks>
  80. </testcase>