[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
At 2006-09-10 17:04 -0700, Ann Marie Rubin \(anrubin\) wrote:
Yes, but in your XSLT work and not in your XSL-FO work.
You can't "access" it, you have to recalculate it.
I hope this helps!
. . . . . . . . . . . . . Ken
Re: [xsl] XSL:FO - how to render a single footnote for multiple, identical footnotes in
Subject: Re: [xsl] XSL:FO - how to render a single footnote for multiple, identical footnotes in From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sun, 10 Sep 2006 20:45:08 -0400 |
At 2006-09-10 17:04 -0700, Ann Marie Rubin \(anrubin\) wrote:
Is there a way to output a single footnote for multiple, identical XML footnote entries in pdf?
Yes, but in your XSLT work and not in your XSL-FO work.
For example, a document that has 2 identical footnotes:
foo <footnote notetext="footnote text" opid="fn1"/> bar <footnote notetext="footnote text" opid="fn1"/>
outputs:
foo1 foo2 ------------ 1. footnote text 2. footnote text
instead of:
foo1 bar1 ------------- 1. footnote text
I created an XML element that cross-references an existing, identical footnote.
<xref toFootnote="yes id="fn1"/>
I want to write an XSL stylesheet that processes the xreftoFootnote element by outputting the footnote number of the referenced footnote.
Good ... then whatever algorithm you are using for the footnote numbering you just use again for the referenced footnote. Remember that it is your stylesheet that calculates and presents the footnote in the first place, so you just have to do it every time you need it.
I have the ID of the referenced footnote but can think of no way to access the footnote number.
You can't "access" it, you have to recalculate it.
Is there a way to save the footnote IDs and footnote numbers in memory so that the xreftoFootnote template could retrieve the footnote number for a particular ID?
No ... but it is very common in XSLT to have to recalculate things because of the non-side-effect-freeness of the language. You might consider using a called template, perhaps based on the current node, then when you present the footnote it gets calculated with the current node ... then when it comes time to use the reference to the footnote, change your current node to the referenced footnote, then just call the template again and it is guaranteed to calculate to the same value (that's the feature of side-effect-freeness).
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL:FO - how to render a sing, Ann Marie Rubin \(an | Thread | [xsl] Truncate input, m.core |
[xsl] XSL:FO - how to render a sing, Ann Marie Rubin \(an | Date | RE: [xsl] Replace new lines by <br>, Ambika.Das |
Month |