So I'm trying to create a sitmap with xml and an xslt files.
I want the URL's for the sitemap to be clickable when displayed (VERY new to this)... here is as far as I got:
<h3>Sitemap</h3>
<xsl:for-each select="urlset/url">
<p>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="loc"/>
</xsl:attribute>
<xsl:text>Link</xsl:text>
</xsl:element>
</p>
</xsl:for-each>
any know how to change the word "Link" to be the URL of the site address its directing to? whilst still keeping the hyperlink in there?
I have already tried:
<h3>Sitemap</h3>
<xsl:for-each select="urlset/url">
<p>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="loc"/>
</xsl:attribute>
<xsl:text><xsl:value-of select="loc"/></xsl:text>
</xsl:element>
</p>
</xsl:for-each>
But I get an error :(
HELP?