[xsl] bookmarks

Subject: [xsl] bookmarks
From: cookie king <cookieking@xxxxxxxxxxx>
Date: Wed, 03 Aug 2005 20:05:28 -0400
I am looking for a small example of a working bookmark. i have several templates, and i can get them to work internally within the page but not externally.

here is a sample of my templates, but they do not work all the time. what i want to accomplish is to create a bookmark within the xml and link to that from an external source.

using these templates the link will appear in the address bar, but the page will not scroll to or go to the bookmark

<xsl:template match="bookmark">
<a>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:value-of select="."/>
</a>
</xsl:template>
<!-- support external and internal hyperlinks to a file or bookmark -->
<xsl:template match="bmarklink">
<a>
<xsl:attribute name="href">
<xsl:value-of select="@url"/><!-- use for url external bookmark -->
<xsl:if test="@location">#<xsl:value-of select="@location"/>
</xsl:if>
</xsl:attribute>
<xsl:value-of select="."/>
</a>
</xsl:template>


Current Thread