Subject: Re: [xsl] Problems with following-sibling From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Wed, 04 Jul 2007 17:17:32 +0200 |
<xsl:for-each select="car[name = 'Ferrari Enzo']"> <xsl:variable name="nextVolume" select="following-sibling::car/volume"/> <line x1="{position()*15}" y1="-{volume} " x2="{(position()+1)*15}" y2="-{$nextVolume}" style="stroke: red;"/> </xsl:for-each> </g>
Here is the problem: When I try to get the "nextVolume" with "following-sibling::car/volume" it works fine if the next car is a Ferrari, but as you can see the cars can be at any order in the xml-file. I've selected specifically the Ferraris with the "for-each", but how do I select the following sibling so that it also matches the car name?
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Problems with following-sibli, Barret Boombastic | Thread | [xsl] accessing a node-set in varia, Sam Carleton |
RE: [xsl] Test for child node categ, Trevor Nicholls | Date | Re: [xsl] howto convert node set in, Sam Carleton |
Month |