Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xsl question... 1

Status
Not open for further replies.

karen4201

Programmer
Mar 9, 2006
37
US
Hi,

I couldn't find an XSL forum, so I thought I'd post my question here.

I'm trying to create a hyperlink based on a value-of. Here is the code, which is not working:

<a href='<xsl:value-of select="myURL"/>' >the link</a>

How could I get this to work?

Thanks in advance.
 
><a href='<xsl:value-of select="myURL"/>' >the link</a>
[tt]<xsl:variable name="x" select="myURL" />
<a href="{$x}">the link</a>
[/tt]
 
Thanks for the vote. Just a note. If you really want an one-liner, you can do this closest to what you posted.
[tt] <a href='&lt;xsl:value-of select="myURL"/&gt;'>the link</a>[/tt]
So yours is not that far. Nevertheless, a breaking up as I'd shown may be easier to read.
 
Correction:
After put it to test, my addition note above is _wrong_ afterall! Sorry! If does not compile, only errorless literal. So in a word, it is wrong, period.
>[myself] <a href='&lt;xsl:value-of select="myURL"/&gt;'>the link</a> [red]<!-- wrong -->[/red]
Please disregard the last post!
 
Or simply:
Code:
<a href='{myURL}'>the link</a>

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top