I have some XML data which includes URIs. I want to list the URIs on an ASP page, but also to make them clickable using <a> tags. However XSLT does not allow you to embed an XSL command within a tag, eg:
<xsl:for-each select="//uri">
<tr>
<td class="tdDetail">
More information
</td>
<td>
<a href="<xsl:value-of select="." />" alt="More information" target=_blank><xsl:value-of select="." /></a>
</td>
</tr>
</xsl:for-each>
How can I include the URL in the <uri> tag after the <a href=" code?
Use the
<xsl:attribute>element to have non-fixed attribute.Edit: As others have mentioned, it is also possible to use attribute value templates: