PDA

View Full Version : <a href="<xsl:value-of .. />"> error


claire rand
01-05-2005, 05:20 PM
question:
How can I use <xsl:value-of select="id" /> to place a value *inside* another value, for example <a href="wibble">text</a> works fine, i want to replace 'wibble' with the xsl code ala:
<a href="<xsl:value-of select='id' />">text</a>
to create a hyperlink based on xml data.

This is intended to populate a list of hyperlinks dynamically from an xml data file. the rest of the file is working fine... tis just adding the links that does work.

I'm getting the message "The character '<' cannot be used in an attribute value" in MSIE 6, I' can't see a direct way around what has got to be a common problem.. I've had a quick look in the archive but I didn't see anything that looked liek this problem..

I'm thinking its one of them things thats sooooo obvious.. but I can't see it.

thanks for any help or pointers to where i can find some help..

I've hunted around in www.w3cschools.com and got everything else working.. just not this bit.

For this project I can't use server side stuff either :-(

claire rand
01-05-2005, 09:06 PM
ok found the answer...

using "{variable}" to get it instead of xsl:value-of..

:-)