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

Re: counting the number of time i call a template

Subject: Re: counting the number of time i call a template
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 19 Jan 2001 04:28:34 -0800 (PST)
number templates for tracing
Floch "Jean-Sébastien" wrote:
> But i need that functionality.
> I have to count the number of time i call a template

Here's the outline of a general solution:

1. Call any template that you want to count from within the contents of
an xsl:variable.

2. Code all such templates to produce first an element with a name that
will uniquely identify the template (e.g. "calledTemplateName"). 

3. Apart from the above "tracing output" a template will function in
almost the same way -- one notable requirement will be to reference any
nodes of the source xml document through a global variable, that has
been assigned the root node of the source document.

4. When the transformation has been performed, the RTF will contain all
"normal output" plus all "tracing output". The count of the nodes of
the "tracing output" having a particular name will be the count of
times a particular template was called.

5. To produce only the "normal output", the RTF should be finally
filtered/copied.

Dimitre.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.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.