Actual element tags are not getting captured.
Posted
by user323719
on Stack Overflow
See other posts from Stack Overflow
or by user323719
Published on 2010-04-27T14:56:32Z
Indexed on
2010/04/27
17:33 UTC
Read the original article
Hit count: 320
I am using the below piece of XSL code to construct a span tag calling a javascript function on mouseover. The input to the javascipt should be a html table. The output from the variable "showContent" gives just the text content but not along with the table tags. How can this be resolved.
XSL:
<xsl:variable name="aTable" as="element()*">
<table border="0" cellspacing="0" cellpadding="0">
<xsl:for-each select="$capturedTags">
<tr><td><xsl:value-of select="node()" /></td></tr>
</xsl:for-each>
</table>
</xsl:variable>
<xsl:variable name="start" select='concat("Tip('", "")'></xsl:variable>
<xsl:variable name="end" select='concat("')", "")'></xsl:variable>
<xsl:variable name="showContent">
<xsl:value-of select='concat($start,$aTable,$end)'/>
</xsl:variable>
<span xmlns="http://www.w3.org/1999/xhtml" onmouseout="{$hideContent}"
onmouseover="{$showContent}" id="{$textNodeId}"><xsl:value-of select="$textNode"></xsl:value-of></span>
Actual Output:
<span onmouseout="UnTip()" onmouseover="Tip('content1')" id="d1t14"
>is my </span
>
Expected output:
<span onmouseout="UnTip()" onmouseover="Tip('<table><tr><td>content1</td></tr>')" id="d1t14">is my </span>
What is the change that needs to done in the above XSL for the table, tr and td tags to get passed?
© Stack Overflow or respective owner