Click to See Complete Forum and Search --> : XML Stylesheets - Substitutions


AWhiteC
03-13-2003, 03:26 PM
I need to output an HTML link using something like this:

<td> <a href="<xsl:value-of select="FileLink"/>"> Hello </a> </td>

but that gives a syntax error. Any suggestions?

khalidali63
03-13-2003, 08:04 PM
I have posted the answer in your original post
BTW
You di dnot have to post same question in 2 threads

:D

kajosman
03-18-2003, 06:35 AM
you need to display the href as an attribute of <a>. e.g

in the xml file

<strTitle>Hello</strTitle>
<link>index.asp</link>

in the xsl file

<a><xsl:attribute name="href"><xsl:value-of select="link" /><xsl:value-of select="strTitle" /></xsl:attribute></a>

Hope this helps.

Kaj

AWhiteC
03-18-2003, 02:15 PM
I did it with:

<td> <a target="_blank"> <xsl:attribute name="href"> <xsl:value-of select="FileLink"/> </xsl:attribute> Hello </a> </td>

as recommended by Khalid. Works great.