8. Footnotes

In XSL-FO footnotes are generated with the <fo:footnote> element and the text body of the footnote with the <fo:footnote-body> element. Both elements do not have specific attributes which could be used for the control. For this reason, unfortunately, there is no scope for the placing of the footnotes in XSL-FO. They are automatically placed in the foot of the running text or the body region of the page in which they are anchored in the text. The formatters treat the footnotes differently when the page has a mulit-column layout (overstretching of all columns vs. placing under each column).

An automatic numbering of the footnotes has to be generated, as with the lists, with the <xsl:number> XSLT element.

It is expected that the footnotes in the text are placed at the position where they shall be anchored. So the formatter inserts the footnotes in the lower part of the page' s body region.

Example:

<fo:block font-size="40pt"> Text </fo:block>
<fo:block font-size="40pt"> Text </fo:block>
<fo:block font-size="40pt"> Text </fo:block>
<fo:block font-size="40pt">
   Text
   <fo:footnote>                                                              (1)
      <fo:inline font-size="15pt" baseline-shift="super">1</fo:inline>        (2)
      <fo:footnote-body>                                                      (3)
         <fo:block font-size="15pt">                         
            <fo:inline font-size="10pt" baseline-shift="super">1</fo:inline>
               Fußnotentext Fußnotentext Fußnotentext Fußnotentext 
               Fußnotentext Fußnotentext Fußnotentext
               <!-- en: footnote text ... -->
         </fo:block>
      </fo:footnote-body>
   </fo:footnote>                         
</fo:block>
<fo:block font-size="40pt">
   Text                         
   <fo:footnote>                                                              (1)
      <fo:inline font-size="15pt" baseline-shift="super">2</fo:inline>        (2)
      <fo:footnote-body>                                                      (3)
         <fo:block font-size="15pt">                         
            <fo:inline font-size="10pt" baseline-shift="super">2</fo:inline>                         
               Fußnotentext Fußnotentext Fußnotentext Fußnotentext 
               Fußnotentext Fußnotentext Fußnotentext                         
         </fo:block>
      </fo:footnote-body>
   </fo:footnote>
</fo:block>

 

Formatter view

Formatter view - footnotes

(1) The <fo:footnote> element has two functions. All instructions before the <fo:footnote-body> child element serve as names for anchors which appear in the text flow at the appropriate place. The content of <fo:footnote-body> is treated as a footnote.

(2) In this example the <fo:inline> element is used in order to display the footnote number in an inline manner.

(3) The <fo:footnote-body> element contains the actual content of the footnote.

Typically, footnotes shall be separated from the text body by lines and/or greater spaces. These separators are defined in XSL-FO with an own <fo:static-content> element within the page sequence. For this purpose the flow-name attribute contains the value xsl-footnote-separator.

Note: This construct is not supported by all formatters.

Example:

<fo:page-sequence master-reference="Example">
  <fo:static-content flow-name="xsl-footnote-separator">    (1)                  
    <fo:block text-align-last="justify">                         
      <fo:leader leader-length="50%" rule-thickness="0.5pt" leader-pattern="rule"/> (2)                       
    </fo:block>
  </fo:static-content>

(1) The attribute value xsl-footnote-separator always inserts the content of the <fo:static-content> element in the given page sequence before the footnotes of a page. If there are no footnotes on a page, this content is omitted.

(2) The <fo:leader> element generates the separation line under the text and over the first footnote of a page. Instead of this line there might also be other static content.

Formatter view

Formatter view - footnotes

<< back next >>

Copyright © dpunkt.verlag GmbH 2004
Printing of the online version is permitted exclusively for private use. Otherwise this chapter from the book "XSL-FO in der Praxis" ("XSL-FO in practice") is subject to the same provisions as those applicable for the hardcover edition: The work including all its components is protected by copyright. All rights reserved, including reproduction, translation, microfilming as well as storage and processing in electronic systems.

dpunkt.verlag GmbH, Ringstraße 19B, 69115 Heidelberg, fon 06221-14830, fax 06221-148399, hallo@dpunkt.de