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

"grouping" footnote numbers

Subject: "grouping" footnote numbers
From: Emma Burrows <Emma.Burrows@xxxxxxxxxxx>
Date: Tue, 11 Oct 2011 10:06:55 +0100
 "grouping" footnote numbers
A bit of fun for you all. I have a bunch of XML documents containing footnote
references in the form <xref href="footnote-xyz" type="fn" />.

When converting this to HTML, I am inserting a footnote reference like so:

<a href="footnote-xyz"><sup><xsl:number level="any"
count="xref[@type='fn']"/></sup></a>

This is fine and I end up with little consecutively-numbered references as
you'd expect.

However, it often happens that footnote references within a document refer to
the same footnote - in that case, they'd like the footnotes to have the same
reference number. I am not entirely sure how to go about this.

Presumably, I'd need to count the xrefs after grouping them based on their
href, but I'm not clear on how to apply that to <xsl:number/>. Or should I go
for a bespoke function or template that assigns a number to each xref/@href in
the document and then allocate that to the current xref based on its @href? (I
may have answered my own question there, but I thought I'd see what other
people think :)

Thanks!

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.