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

Re: [xsl] Counting preceding-siblings with a different parent


Subject: Re: [xsl] Counting preceding-siblings with a different parent
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Thu, 16 Dec 2004 16:49:20 +0100

perhaps you want to count your preceding siblings and your preceding
cousings (ie, the children of your parent's preceding-siblings)
count(preceding::*) + count(../preceding::*/*)
>
Yes that was it.

I realized my stupidity of wanting to count sibilings of different parents,
but its still fairly early here and I've only had one cup of coffee.

In the hope to prevent mistakes when you try the above after your coffe, David probably meant:


count(preceding-sibling::*) + count(../preceding-sibling::*/*)

:-)

Cheers and good morning,
Geert


Current Thread