HTML code in an attribute

Subject: HTML code in an attribute
From: "Hakan Pettersson" <hakanxsl15@xxxxxxxxxxx>
Date: Tue, 10 Oct 2000 08:37:48 GMT
I'm trying to output HTML code as an attribute to a JavaScript function.

However I get:
'Before<BSome textAfter'

I would like to have:
'Before<B>Some text</B>After'

<xsl:template match = "List">
   <xsl:variable name="var">
       <xsl:apply-templates select="ListItem"/>
   </xsl:variable>

<xsl:copy-of select="$var"/> (This works!)

<xsl:element name="a">
<xsl:attribute name="href">javascript:void(0);</xsl:attribute>
<xsl:attribute name="onMouseOver">return someJS_Function('<xsl:copy-of select="$var"/>')</xsl:attribute>
(This doesn't work)
<img src="images/note.gif" border="0"/>
</xsl:element>


</xsl:template>

<xsl:template match = "ListItem">Before<B>Some text</B>After</xsl:template>


/Håkan _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at http://profiles.msn.com.


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread