Yes , position() works for me when i'm listing the footnotes at the bottom
of the page. But what I need is to numerate them as they appear in the
main body of the document.
<xsl:template match="footnote">
<SUP><FONT SIZE="-1">
<A NAME="#BODY{ ??????? }">
<A HREF="#FOOT{ ??????? }"> <!-- jump to the footnote at
bottom of page -->
<xsl:number/> <!-- doesn't work! -->
</A></A>
</FONT></SUP>
</xsl:template>
Using position() here does not work since every paragraph, heading etc. is
a new context, so that the footnotes start from 1 in every context.
Örvar
> Yes, position() should do the job for you. It specifies the position
> within the context node list. When you select footnotes using
> <xsl:for-each select="//footnote">, all of them are in the same node
> list, so position() should work. What is wrong?
>
> Petr
>
>
> Örvar Kárason wrote:
>
...
> > The footnote tag can appear almost anywhere in my document:
> >
> > /doc/source/footnote
> > /doc/text/heading/footnote
> > /doc/text/p/footnote
> > ...
> >
> > <footnote value="FOOTNOTE_TEXT">ORIGINAL_NUMBER<footnote/>
> >
> > FOOTNOTE_TEXT is printed at the bottom of the page.
> > ORIGINAL_NUMBER is not used.
> >
> > <xsl:number/> seem to be what I need but its not implemented yet.
> >
> > <xsl:template match="footnote">
> > <SUP><FONT SIZE="-1">
> > <A NAME="#BODY{ ??????? }">
> > <A HREF="#FOOT{ ??????? }"> <!-- jump to the footnote text at
> bottom of
> > page -->
> > <xsl:number/> <!-- doesn't work! -->
> > </A></A>
> > </FONT></SUP>
> > </xsl:template>
> >
> > I use position() to solve this when the footnote-text is printed at the
> > bottom of the page.
> >
> > <xsl:template match="doc">
> > ...
> > <OL>
> > <xsl:for-each select="//footnote">
> > <LI>
> > <A NAME="#FOOT{position()}">
> > <A HREF="#BODY{position()}"> <!-- jump up into main text -->
> > <xsl:value-of select="@value"/>
> > </A></A>
> > </LI>
> > </xsl:for-each>
> > </OL>
> > ...
> > </xsl:template>
> >
> > This seems to be such a simple problem, yet I have been unable to find a
> > solution to it.
> > All help would be most welcome. :)
> >
> > Örvar Kárason (XSLT newbie)
> > [EMAIL PROTECTED]
>
>
> --
> Petr Cimprich
> Ginger Alliance Ltd.
> www.gingerall.com