Page 1 of 1

"Back to top" link using name templates

Posted: Sat Dec 01, 2007 4:01 pm
by papo3
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:call-template name="bottom"/>

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

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

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?