Jump to content

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


mwunderlich
 Share

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

Link to comment
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!

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...