xsl-list
[Top] [All Lists]

Re: [xsl] No of Times Named Template called

2008-03-12 21:30:11
Hi ,
Could you please explain more on this.
How do I find  Number of sucess and failure from this?

Could you please provide me a example and help me in this solution.

Thanks,
Senthil

On Wed, Mar 12, 2008 at 8:53 PM, Mukul Gandhi 
<gandhi(_dot_)mukul(_at_)gmail(_dot_)com> wrote:
You cannot do this in a procedural sense in the named template itself.
 For e.g. you cannot update a counter variable in the template, and use
 it later.

 You have to solve the problem in the XSLT way, for e.g.

 <xsl:for-each select="$sequence">
   <xsl:call-template name="STATUS_DETECTION">

   </xsl:call-template>
 </xsl:for-each>

 This will execute the template the required number of times, depending
 on the size of the "sequence".



 On 3/13/08, Senthilkumaravelan K <skumaravelan(_at_)googlemail(_dot_)com> 
wrote:
 > Hi All,
 > I am calling named template by passing the param value 'S' and 'N'.
 > I would like to know,is there anyway to find the The No of times named
 > templated called with  'S' as value and otherwise.
 >
 > This is my named template.
 >
 >        <xsl:template name="STATUS_DETECTION">
 >                <xsl:param name="my-param" />
 >                <xsl:choose>
 >                        <xsl:when test="$my-param='S'">
 >                <img src="../img/success.png"/>
 >                        </xsl:when>
 >                        <xsl:otherwise>
 >                <img src="../img/failure.png"/>
 >                        </xsl:otherwise>
 >                </xsl:choose>
 >        </xsl:template>
 >
 > Thanks,
 > Senthil



 --
 Regards,
 Mukul Gandhi

 --~------------------------------------------------------------------
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
 To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
 or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
 --~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--