[xsl] Problem with xslt recursion

Subject: [xsl] Problem with xslt recursion
From: Roopesh Kumar <roopeshkumar_in@xxxxxxxxx>
Date: Tue, 10 Feb 2004 08:15:27 -0800 (PST)
This is my first doubt with this group..hope i get
some help..

I have the following xml...
<Component name = "EntrySpecialMessageAddButton">

and i have a recursive call to a template whose
function is to concatenate all the values with the tag
name Type..(The actual functionality of the template
is more than what is being described here..which
cannot be disclosed)

<xsl:template name="build">
<xsl:param name="ResourceName"/>
<xsl:param name="Index"/>
<xsl:param name="Count"/>
<xsl:variable name="try">
<xsl:value-of select ="ResourceTypeSet/Type[$In]"/>
<xsl:if test="$Index &lt; $Count">
<xsl:call-template name="buildResourceName">
<xsl:with-param name="ResourceName"><xsl:value-of
<xsl:with-param name="Index"><xsl:value-of

<xsl:with-param name="Count"

The initial call to the template is as follows 

<xsl:call-template name="build">
<xsl:with-param name="ResourceName"/>
<xsl:with-param name="Index" select="1"/>
<xsl:with-param name="Count" select="$Count+1">

The problem is that for each recursive call to the
template the value of try remains R1...
whereas it should have been R1 in the first call..
R2 for the next call..and R3 for the third cal..

I wanna know if what i am doing in the template is



Software Engineer 
Verizon Data Services India 


One manages uncertainty; one does not solve it.  
Eliminating uncertainty eliminates opportunity.  
Chaos is the engine of evolution.

Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread