[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Increment/decrement a variable in XSL


Subject: Re: [xsl] Increment/decrement a variable in XSL
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 3 Apr 2002 14:48:23 +0100

Hi Petr,

> The third and the most straightforward way is to use extension
> functions. However, such a solution would depend on the processor in
> use (to some extent at least).

Do you mean using a node-set() extension function? Yes, you're right -
that would be another way. Create a result tree fragment containing
the correct answers, convert that to a node set using a node-set()
extension function and then count the number of nodes using the
count() function. This is probably less straightforward than counting
the correct answers directly (if that's possible), but more
straightforward than writing a recursive template.

(I hope you weren't suggesting using something like saxon:assign or
writing an extension function that updated a variable... ;)

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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



Current Thread