Re: [xsl] XSL:FO - how to render a single footnote

Subject: Re: [xsl] XSL:FO - how to render a single footnote
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Sep 2006 18:00:19 -0400
At 2006-09-12 12:02 -0700, Ann Marie Rubin \(anrubin\) wrote:
Thanks for your response.  I don't understand how to implement what
your'e suggesting.

This template rule matches footnote:

<xsl:template match="footnote">
          <xsl:if test="@opid">
                <fo:wrapper id="{@opid}" />
        </xsl:if>
        <fo:footnote>
            <fo:inline font-size="0.83em" baseline-shift="super">
                <xsl:number level="any" count="footnote" format="1"/>
...
This template counts all footnotes so the result is the total number of
footnotes in the document, not footnote number of the particular
footnote referenced by the targetid attribute:
...
                <xsl:otherwise>
                            <xsl:number level="any" count="footnote"
format="1"/>

You will have to change your current node to be the referenced footnote. Something like:

<xsl:for-each select="id(@targetId)">
  <xsl:number....
</xsl:for-each>

...
What I want is to
count the number of the footnote with the fn_foo2 attribute.

<xsl:number level="any" count="footnote[@opid='fn_foo2']" format="1"/>

Were you aware the above is valid use of the instruction? Many of my XSLT students are not aware the count= attribute is a match pattern and not a select pattern.

I'm guessing you haven't tried it since I don't see it in your code snippets.

I hope this helps.

. . . . . . . . . . Ken

--
UBL/XML/XSLT/XSL-FO training: Verx, Denmark 2006-10-02/06,11-20/24
UBL International 2006  2006-11-13/17 http://www.ublconference.com
World-wide corporate, govt. & user group UBL, XSL, & XML training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread