Re: [xsl] re: recursive looping and variable scope

Subject: Re: [xsl] re: recursive looping and variable scope
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Thu, 7 Jan 2010 10:08:36 +0530
you have code,

 <xsl:variable name="link1">
     <xsl:call-template name="getSchedule"/>
 </xsl:variable>

which is used to construct the variable, "filename".

I can see nothing, that can change the output of template,
"getSchedule" (for e.g, some kind of parameter, which can change the
output of this template, for each call).

Therefore, by visual inspection of your stylesheet I am tempted to
say, that the error message reported by the XSLT engine looks correct.

On Thu, Jan 7, 2010 at 8:45 AM, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
> I don't think, that a recursive template should be an issue, for the
> error that XSLT processor is reporting, "for attempting to write to
> the same URI". This should work fine, as long as URIs are different in
> each recursive call.
>
> The URI is generated with this code fragment:
> <xsl:variable name="filename">policy_<xsl:value-of
> select="$link1/jobs/job/@jobid"/><xsl:text>.xml</xsl:text></xsl:variable>
>
> and this is dependent on variable, $link1 which is populated by
> execution of the template, "getSchedule".
>
> I suspect, there could be an issue with logic inside template,
> "getSchedule" (which you haven't shared with us. can you please show
> that if it's possible.) which is probably generating similar content
> in different template calls.



-- 
Regards,
Mukul Gandhi

Current Thread