IntelliJ Java IDE
The moose likes XML and Related Technologies and the fly likes Footnote Linking in XSL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Footnote Linking in XSL" Watch "Footnote Linking in XSL" New topic
Author

Footnote Linking in XSL

Donna Meyer
Greenhorn

Joined: Sep 12, 2000
Posts: 21
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.
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
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.

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Donna Meyer
Greenhorn

Joined: Sep 12, 2000
Posts: 21
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
Sheriff

Joined: Aug 26, 2000
Posts: 10065
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.
 
IntelliJ Java IDE
 
subject: Footnote Linking in XSL
 
Threads others viewed
Java Applet: Hyperlinking the content of a Jlist
hyperlinking
The Rendering Fidelity of Footnotes
problem with hyperlinking the same jsp page
Hyperlinking
developer file tools