Thanks Chris.
I have tried your sugesstions. Now, i could see that only + gets printed but
not href tag around it. Here's the changes i have done. '+' is supposed to
be label of the href.
<xsl:call-template name=columnHeader">
<xsl:with-param name="value">
<xsl:attribute
name="id">frameloader</xsl:attribute>
<xsl:attribute
name="href">javascript:void(0);</xsl:attribute>
<xsl:attribute
name="onclick">javascript:<xsl:value-of
select="$gridName"/>.expandAllTreeRows(this);</xsl:attribute>
+
</xsl:with-param>
</xsl:template>
and in the template i have used,
<xsl:apply-templates select="exsl:node-set($value)" mode="identity"/>
along with
<!-- 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>
Please suggest.
Christoffer Dam Bruun wrote:
>
> Hi mahati,
>
> I think you should create a resulttree fragment containing the 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">
>
> <xsl:attribute name="href">javascript:void(0);</xsl:attribute>
> <xsl:attribute name="id">frameloader</xsl:attribute>
> ...
>
> </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.
>>
>
>
>
--
View this message in context:
http://www.nabble.com/XSL%3AVALUE-OF-tp24368424p24369311.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.