Jump to content
Sign in to follow this  
mwunderlich

How to insert a hyerling using "xsl:value-of"?

Recommended Posts

Dear all, I am trying to retrieve hyperlinks from an XML-document (stored in an element called <link>) and insert them into the transformed HTML doc by using "xsl:value-of". However, the following won't work (and rightly so):

<a href="<xsl:value-of select="link"/>" target="_blank">

Is there another possibility? I'd appreciate any help. All the best, M

Share this post


Link to post
Share on other sites

You should be able to do something like this:

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

There's also two posts about how to get the <img> tag to work someware in the XML and XSL forums. Those are about roughly the same thing you need here.Hope that helps!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...