我正在使用下面的 XSL 代码构建一个跨度标记,在鼠标悬停时调用 javascript 函数。javascipt 的输入应该是一个 html 表。变量“showContent”的输出只给出了文本内容,而不是表格标签。这怎么能解决。
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>
实际输出:
<span onmouseout="UnTip()" onmouseover="Tip('content1')" id="d1t14"
>是我的</span
>
预期输出:
<span onmouseout="UnTip()" onmouseover="Tip('<table><tr><td>content1</td></tr>')" id="d1t14">is my </span>
在上述 XSL 中需要对 table、tr 和 td 标记进行哪些更改才能通过?