[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] "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!
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|