[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: No of Times Named Template called

Subject: Re: No of Times Named Template called
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 13 Mar 2008 09:23:18 +0530
Re:  No of Times Named Template called
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@xxxxxxxxxxxxxx> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.