[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|