Re: [xsl] A position question

Subject: Re: [xsl] A position question
From: "W. Eliot Kimber" <eliot@xxxxxxxxxx>
Date: Wed, 13 Feb 2002 11:56:05 -0600
"Haque, Suraiya" wrote:

> I would like to find the positions of the elemB elements with id="11". I can
> get the next one by following-sibling::elemB[@id="11"], but I don't know how
> to find it's position in the context node. Any suggestions?

Count the number of preceding siblings:
count(preceding-siblings::elemB[@id="11"])

Cheers,

Eliot
-- 
W. Eliot Kimber, eliot@xxxxxxxxxx
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139

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


Current Thread