[xsl] alternating node type in a loop

Subject: [xsl] alternating node type in a loop
From: "Tyler Queen" <xmllist@xxxxxxxxxxxx>
Date: Fri, 12 Jul 2002 12:21:14 -0700 (PDT)
I want to loop through all the article nodes within a
section element. The problem is I want to alternate the
way they are looped by "type" going "1,2,1,2,1,2" and
then when there aren't anymore to alternate through
finish looping through the remaining nodes.
Any Ideas?

This is the xml

<articles>
	<section>
		<article type="1">Article</article>
		<article type="2">Article</article>
		<article type="2">Article</article>
		<article type="1">Article</article>
		<article type="2">Article</article>
		<article type="1">Article</article>
		<article type="1">Article</article>
		<article type="1">Article</article>
	</section>
<articles>

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


Current Thread