• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Footnote Linking in XSL

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering if anyone has done any footnote linking in an xsl for text output. I need to capture the chapter number like a global variable and apply it to the footnote references in text as well as to their respective corresponding destination footnotes. I have multiple chapters and previous to our conversion to xml, I did this using a global variable that overwrote itself with each new chapter number. In xsl, however, I'm a little stumped as the variable function doesn't work the same as we know variable work because its a constant values and cannot be overwritten with a new value. I have seen examples for hyperlinking to urls and multiple text files, but I haven't seen any examples of hyperlinking footnotes in a file with multiple chapters. Can anyone point me in the right direction? Maybe there's something I've overlooked in documentation I've researched through? Thanks so much for any help anyone can offer.
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a trick allowing you to �update� variable:
<xsl:variable name="myVar" select = "$myVar + 1"/>
Of course, here you simply create a new variable with the same name. Another (probably better) way to count something is to use position() function.
If it doesn�t solve your problem, maybe you could posts your input information and the output, you need to get, so we can say something more specific.
 
Donna Meyer
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like a pretty good trick. I'll try it and let you know if it works. I was just fussing around with ID and IDREF to see if that would work. Would that be a possible solution also?
 
Mapraputa Is
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
usually ID/IDREF are used to get some element based on other element�s value. If your <chapter> elements already have chapter numbers, that may work.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!