"Back to top" link using name templates

Here should go questions about transforming XML with XSLT and FOP.
papo3
Posts: 1
Joined: Sat Dec 01, 2007 3:59 pm

"Back to top" link using name templates

Post by papo3 »

Hello,
At the end of my xml/html page I want to add the hyperlink "back to the top" that points to the top of the page.
I want to do this using the xsl:call-template element.

I guess i have to use sth like that in my stylesheet :

<xsl:template match="/">
<xsl:call-template name="top"/>
<xsl:apply-templates/>
<xsl:call-template name="bottom"/>
</xsl:template>

<xsl:template name="bottom">
<xsl:text>This is the bottom of the page</xsl:text>
</xsl:template>

<xsl:template name="top">
<xsl:text>This is the top of the page</xsl:text>
</xsl:template>

But how do I integrate the hyperlink, and where do I put it in the stylesheet? Has anyone a complete xsl stylesheet example with that?