Re: [xsl] using step or following-sibling?

Subject: Re: [xsl] using step or following-sibling?
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Mon, 06 Dec 2004 22:52:03 +0100
Bit late respons, but this riddle resurfaced in my mind, looking over the postings of the last few days (many as usual!)...

Though a good suggestion by Wendell (as usual) to use the way xsl:value works, there is something unsatisfactory about that solution. It still leaves the question: is there an alternative for position()?

The only answer I can come up with: count().

Unfortunatily, one will have to build a document fragment with the following-siblings and then get all childs which have count(preceding-siblings) equal to the position you are looking for. Not very elegant, nor very flexibel, and it will require the node-set function in XSLT 1...

Other suggestions?

;-)
Grt(z)

JBryant@xxxxxxxxx wrote:

Isn't row[1] short for row[position()=1]? Since he's trying to avoid the position() function, isn't that a problem?

I'm curious: What issue do you have with the position function, Matt?

Jay Bryant
Bryant Communication Services




Geert Josten <Geert.Josten@xxxxxxxxxxx> 12/03/2004 04:21 PM
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx



To xsl-list@xxxxxxxxxxxxxxxxxxxxxx cc

Subject
Re: [xsl] using step or following-sibling?






<xsl:value-of select="following-sibling::row[1]/emp_nm" />


Cheers,
Geert





-- Geert.Josten@xxxxxxxxxxx IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

Current Thread