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

count of how many times a particular template is being

Subject: count of how many times a particular template is being called
From: Leena Kulkarni <mulberrylist@xxxxxxxxxxx>
Date: Tue, 22 Apr 2003 14:20:50 +0100 (BST)
leena kulkarni
Can I get a count of how many times a particular
template is being called?

Im thinking of something like - 

<xsl:variable name="globalVar" select"1" />

<xsl:template match="Node1">
	<xsl:for-each select="$Values">
		<xsl:call-template name="T1"/>			
	</xsl:for-each>
</xsl:template>

<xsl:template name="T1">
	<xsl:if test="ValueIsValid">
		<xsl:call-template name="T2"/>
	</xsl:if>
</xsl:template>

<xsl:template match="T2">
	Called for <xsl:value-of select="$globalVar" />
	<!-- Increament the var???? -->
</xsl:template>

The final template creates the output.
I showed this for what I want. I know we cannot
reassign variables
in xsl. As I am iterating over $Values, that is a
variable, I am getting
undesired result by using xsl:number or position().
Can anyone give any hints?

Thanks

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
       visit http://in.tv.yahoo.com

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


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.