xsl-list
[Top] [All Lists]

bookmarks

2005-08-03 17:05:28
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>



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>