Re: footnote back reference?

John Burke <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization rastagrafix
Message-ID <[email protected]>
>>>>> "jarno" == Jarno Elovirta <[email protected]> writes:
[snip]
  >> I have a footnote references like this:
  >>
  >> <FNR HREF="CH3TBL2FN1">&ast;</FNR> -or- <FNR
  >> HREF="CH3TBL2FN2">&ast;&ast;</FNR> etc..
  >>
  >> And the footnotes are like this:
  >>
  >> <FN ID="CH3TBL2FN1">firstfootnotetext</FN> <FN
  >> ID="CH3TBL2FN2">secondfootnotetext</FN>
  >>
  >> I want this:
  >>
  >> &ast; firstfootnotetext &ast;&ast; secondfootnotetext
  >>
  >> Question: how can I replace the @ID with the matching FNR text?
  jarno>
  jarno> <xsl:template match="FNR"> 
  jarno>    <xsl:value-of select="."/>
  jarno>    <xsl:text> </xsl:text> 
  jarno>    <xsl:value-of select="//FN[@ID = current()/@href]"/> 
  jarno> </xsl:template>

Actually, like this (and thanks, Jarno):

<xsl:template match="FN">
   <xsl:apply-templates select="//FNR[@HREF=current()/@ID]"/>
   <xsl:text>  </xsl:text>
   <xsl:value-of select="."/>
</xsl:template>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.