following-sibling node vs current xslt/xpath

Melchy

New Member
I need to select all odd position elements and put them in a left floated div and all even elements in right floated div as this:\[code\]<rows> <row title="A" /> <row title="B" /> <row title="C" /> <row title="D" /> <row title="E" /> <row title="F" /></rows>\[/code\]==================Transform as===>\[code\]A-----BC-----DE-----F\[/code\]I am using the following xsl:\[code\] <div class="content-left" style="width:250px; float:left;"> <span class="NewsHeading"> <h4><xsl:value-of select="@Title"/></h4> </span> </div> <div class="content-right" style="float:right"> <span class="NewsHeading"> <h4><xsl:value-of select="following-sibling::*[1]/@Title"/></h4> </span> </div>\[/code\]But my XSLT produces the following:\[code\]A----BB----CC----DD----EE----F\[/code\]How to make the second row start from the first row's following-sibling's following sibling?? Sounds kinda weird..basically i just don't want the repetition..
 
Back
Top