[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

REPOST - duplicate footnotes

Subject: REPOST - duplicate footnotes
From: "Ann Marie Rubin \(anrubin\)" <anrubin@xxxxxxxxx>
Date: Wed, 20 Sep 2006 08:18:00 -0700
duplicate footnotes
Hello XSL experts,

I'm reposting this question because I'm still thrashing trying to solve
this problem.

I have an XSL style sheet that counts all the footnotes in a document.
I'm trying to modify this stylesheet to not increment the count for
duplicate footnotes and to not output a footnote number with footnote
text for the duplicate note.

Desired output for this XML:

foo<footnote notetext="footnote text 1" opid="fn1"/>
bar<footnote notetext="footnote text 2" opid="fn2"/>
boo<xrefinline toFootnote="yes" targetid="opid="fn2"></xrefinline>

foo1
bar2
boo2

1. footnote text 1
2. footnot text 2

The xrefinline element has a targetid attribute set by a user to the
unique opid value of the footnote to reference. Here is the XSL template
for xrefinline.

When this template is matched, I have the opid number of the target
footnote.  I need to figure out how to output the number of the footnote
being referenced.  The code below always outputs 1, the number of
footnotes whose opid attribute equals the current targetid attribute.

Is there a way to do this?

<xsl:template match="xrefinline">
   <xsl:variable name="xrefnode" select="./@targetid" />

 		<xsl:choose>
			<xsl:when test="@toFootnote='no'">
        		<fo:basic-link color="blue"
internal-destination="{@targetid}">
           			<xsl:value-of select="."/>
(<xsl:value-of select="$__Page_Token"/>
            		<fo:page-number-citation
ref-id="{@targetid}"/>)</fo:basic-link>
 			</xsl:when>
		<xsl:otherwise>
				<fo:inline baseline-shift="super"
font-size="8pt">
				    <!--counts the number of footnotes
whose opid attribute = the targetid -->
					<!-- attribute of the current
note. I want to output the number of the  -->
					<!-- footnote referenced by this
targetid. -->
					<xsl:number
count="footnote[@opid=$xrefnode]" format="1" level="any"/>
				</fo:inline>
	    </xsl:otherwise>
		</xsl:choose>
   </xsl:template>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.