PDA

View Full Version : Using XML in html attribute via XSL


mindlessLemming
12-12-2004, 12:54 PM
I'm trying to output my <url></url> element as the href attribute of a link, but I always get a 'not well-formed' error from the link.
Here is the XSL snippet in question:

<a href="<xsl:value-of select="url"/>">Visit Site</a>

I also tried using single quotes for the attribute, but that made no difference.
So where am I going wrong here? Surely XSL allows for XML to be transformed into an attribute value... :confused:

Problem Soved :)
Here's the code:

<a href="{url}">Visit Site</a>