DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37579>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37579





------- Additional Comments From [EMAIL PROTECTED]  2008-02-13 12:36 -------

Workaround as offered by Ron Van den Branden on fop-users@ :

A way in which the problem can be avoided, is by generating fo:footnote areas 
for those footnotes *outside* the areas of their 
containing lists and tables. If those fo:footnote areas don't contain any text 
in their fo:inline footnote markers, the latter don't 
show up in the inline text, while the fo:footnote-body does end up in the 
footnote region at the bottom of the page. [Note: this 
use of footnotes is inspired by solutions to other vertical alignment issues 
like 
<http://www.dpawson.co.uk/xsl/sect3/fofixedposn.html#d12878e43>]
Stylesheet-wise this involves a two-way treatment of footnotes inside lists and 
tables: 1) generate the footnote markers inline 
(just a fo:inline containing the footnote marker suffices), 2) generate the 
fo:footnote areas for each of those footnotes out-of-
line, inside a fo:block after the affected fo:list-block / fo:table.

I'll illustrate with following code, in which the first footnote doesn't get 
rendered, while the second one does:

   <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
     <fo:layout-master-set>
       <fo:simple-page-master master-name="simple" page-height="5in" 
page-width="5in">
         <fo:region-body/>
       </fo:simple-page-master>
     </fo:layout-master-set>
     <fo:page-sequence master-reference="simple">
       <fo:flow flow-name="xsl-region-body">
         <fo:list-block provisional-distance-between-starts="50pt" 
provisional-label-separation="10pt">
           <fo:list-item>
             <fo:list-item-label end-indent="label-end()">
               <fo:block>label</fo:block>
             </fo:list-item-label>
             <fo:list-item-body start-indent="body-start()">
               <fo:block>
                 <!-- This fo:block contains a 'regular' fo:footnote inside a 
fo:list-block. Note that the fo:footnote-body
                         doesn't get rendered in the output, due to bug 37579
                         
(http://issues.apache.org/bugzilla/show_bug.cgi?id=37579) -->
                 List item with a footnote<fo:footnote>
                 <fo:inline font-size="60%" 
baseline-shift="super">1)</fo:inline>
                   <fo:footnote-body>
                     <fo:block start-indent="0.5cm" text-indent="-0.5cm">
                       <fo:inline font-size="60%" 
baseline-shift="super">1)</fo:inline> This footnote doesn't get 
rendered.</fo:block>
                   </fo:footnote-body>
                 </fo:footnote>.
               </fo:block>
             </fo:list-item-body>
           </fo:list-item>
           <fo:list-item>
             <fo:list-item-label end-indent="label-end()">
               <fo:block>label</fo:block>
             </fo:list-item-label>
             <fo:list-item-body start-indent="body-start()">
               <fo:block>
                 <!-- this footnote is only marked inline by a fo:inline marker 
-->
                 List item with a footnote<fo:inline font-size="60%" 
baseline-shift="super">2)</fo:inline>.
               </fo:block>
             </fo:list-item-body>
           </fo:list-item>                    </fo:list-block>
         <!-- this block contains the fo:footnote areas for all separate 
footnotes in the previous fo:list-block -->
         <fo:block>
           <fo:footnote>
             <!-- this fo:inline footnote marker is empty to avoid it getting 
output after the fo:list-block -->
             <fo:inline/>
             <fo:footnote-body>
               <fo:block start-indent="0.5cm" text-indent="-0.5cm">
                 <fo:inline font-size="60%" 
baseline-shift="super">2)</fo:inline> This footnote does get 
rendered.</fo:block>
               </fo:footnote-body>
             </fo:footnote>
           </fo:block>
         </fo:flow>
       </fo:page-sequence>
     </fo:root>

Note that this approach will require some refinements. For example, for lists / 
tables that span multiple pages, the footnotes 
will all end up before / after the affected list / table (depending on the 
placement of their containing block). In order to avoid 
this, the fo:list-block / fo:table areas could be generated at the lower level 
of the list items, i.e. the input list / table will not 
generate a fo:list-block / fo:table, but each list item / table row will. Each 
of those fo:list-block / fo:table areas can then be 
followed by a fo:block containing the relevant fo:footnote area. Of course this 
produces a lot of one-item lists / one-row tables, 
but it also guarantees that footnotes will show at the right page when they 
occur in long lists / tables. I haven't tested it in my 
production XSL-FO stylesheets, and of course treatment of nested lists would 
demand further consideration, but I think the 
principle works.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to