Re: [xsl] COUNT IN THE SAME STYLESHEET

Subject: Re: [xsl] COUNT IN THE SAME STYLESHEET
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Sun, 01 Dec 2002 20:32:59 +0200
adrianori@xxxxxxxx wrote:

I'VE AN URGENT PROBLEM TO SOLVE
Please, don't write in upper case, it's like you are screaming.


I NEED TO COUNT THE NUMBER OF NODE "NAME" BUT I HAVE TO DO IT IN THE
SAME XSL SHEET THAT PRODUCE THEM!
That greatly depends on what NAME element generation logic is. I mean if you are just copying them as is from a source xml, you can number them in a source.
General solution can be as follows: transform to a variable, then convert it to a nodeset, calculate what do you want and then output. But that requires extension function xxx:node-set(rtf) and more more memory for temporary tree.
+ consider 2 pass solution - first stylesheet did actual transformation and second one number your nodes.


--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


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



Current Thread