Hi mahati,
I think you should create a resulttree fragment containing the <a> tag
instead of trying to print it as text.
I would suggest doing something like :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:exsl="http://exslt.org/common">
<xsl:call-template name=columnHeader">
<xsl:with-param name="value">
<a>
<xsl:attribute name="href">javascript:void(0);</xsl:attribute>
<xsl:attribute name="id">frameloader</xsl:attribute>
...
</a>
</xsl:with-param>
</xsl:call-template>
<xsl:template name="columnHeader">
<xsl:param name="value"/>
...
<!-- now print the fragment -->
<xsl:apply-templates select="exsl:node-set($value)" mode="identity"/>
...
</xsl:template>
<!-- an indentity transform scoped by a specific mode - so that it is
not accidentally run-->
<xsl:template match="@*|node()" mode="identity">
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="identity"/>
</xsl:copy>
</xsl:template>
Best regards,
Christoffer Bruun
mahati skrev:
I have a template say, columnHeader which i am calling as below in a xsl:
<xsl:call-template name="columnHeader">
<xsl:with-param name="value"><a id="frameLoader"
href="javascript:void(0);" onclick="javascript:<xsl:value-of
select="$gridName"/>.expandAllTreeRows(this);">+</a></xsl:with-param>
</xsl:call-template>
Inside the template apart from other stuff, i print the value using
xsl:value as below:
<xsl:value-of select="$value"/>
This code was working fine before migrating to Xalan 2.7.1. But, once i
moved to Xalan 2.7.1, text in the value variable is getting printed as
normal text, it's not being treated as html and hence not being rendered as
a href in the browser. Instead i get something like javascript:void(0); +
as plaint text.
Please suggest.