This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

alternating node type in a loop


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]