xsl-list
[Top] [All Lists]

Re: XSL-FO footnotes only on the last page

2002-11-30 10:31:46
Lee, Insoo wrote:
...
  It correctly recognizes the first page, but from there on, it uses
'anypage' simple-page-master for all following pages.   It almost seems like
page-position="any" is not recognizing the last page....

No surprise: "any" matches any page, and if a matching
conditional page master reference is found, further searching
stops, so that the following page master reference is never
considered.

Anyway, I suppose you are using FOP? In this case, "last"
is not really implemented but matches always. Properly
implementing "last" is really problematic, because you
know you are on the last page only after you formatted
it, so all the formatting has to be rolled back and redone
with the page master for "last" (wich may cause the page to
be *not* the last page...)

As for your original problem, the solution has nothing to do
with conditional page masters. Instead of generating
fo:footnote elements, generate regular fo:block elements at
the end of the flow, usually with moded templates:
 <xsl:template match="document">
   <fo:flow>
     <xsl:apply-templates/>
     <!-- endnote separator -->
     <fo:block><fo:leader leader-pattern="rule"/></fo:block>
     <xsl:apply-templates select=".//footnote" mode="endnote"/>
   </fo:flow>
 </xsl:template>
 <xsl:template match="footnote">
   <fo:wrapper font-size="8pt" vertical-align="super">
     <xsl:number count="footnote"/>
   </fo:wrapper>
 </xsl:template>
 <xsl:template match="footnote" mode="endnote">
   <fo:block font-size="8pt">
     <xsl:number count="footnote"/>
     <xsl:text>: </xsl:text>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
(Beware: untested)

J.Pietschmann


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>