This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

HTML code in an attribute


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]