Hi,
i need to amend the value stored in the element in XSLT and this needs to be carried out with in a <template> code..
Please can you help me how to do this?
in the below code, in "GetTypeListVal ue" template call i need to amend the value stored in the input parameter (NodeName) with the value derived with in the template..
Thanks in adv for your help/comments
Cheer
Venu
i need to amend the value stored in the element in XSLT and this needs to be carried out with in a <template> code..
Please can you help me how to do this?
in the below code, in "GetTypeListVal ue" template call i need to amend the value stored in the input parameter (NodeName) with the value derived with in the template..
Thanks in adv for your help/comments
Cheer
Venu
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:template name="GetTypeListValue"> <xsl:param name="NodeName"/> <xsl:copy> <xsl:variable name="sInput" select="$NodeName"></xsl:variable> <xsl:variable name="sTLValue"> <xsl:choose> <xsl:when test="$sInput = '01'"><xsl:value-of select="Description1"/></xsl:when> <xsl:when test="$sInput = '02'"><xsl:value-of select="Description2"/></xsl:when> </xsl:choose> </xsl:variable> <xsl:value-of select="$sTLValue"/> [B] <!-- i need to update the value stored $NodeName with the derived value $sTLValue here.. --> [/B] </xsl:copy> </xsl:template> <xsl:template name="Get_CustomerDetail"> <xsl:call-template name="GetTypeListValue"> <xsl:with-param name="NodeName" select="/CompositionRequest/Request/Type"/> </xsl:call-template> </xsl:template> <!-- copy the data --> <xsl:template match="*"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet>
Comment