[xsl] conditional looping in a for loop based on look ahead

Subject: [xsl] conditional looping in a for loop based on look ahead
From: navjeet chabbewal <navjeet@xxxxxxxxx>
Date: Thu, 18 Sep 2003 09:15:08 -0700 (PDT)
First of all my apologies for the previous two
messages which were incomplete.

I am trying to apply stylesheet on following xml


and I want to write all the headers(h3 elements) to
one file. The value of div elements for first header (
xxxx, yyy and zzz )to another file and value of div
elements ( mmm ) to another file. In my stylesheets I
have first a foor loop for h3 elements and a nested
for loop for div elements. How do skip the second loop
(div loop) when I am done with the div elements of
each header? For example when I am done processing div
elements with values xxxx, yyy and zzz, I would want
to stop writing to the file and skip the div loop. I
was thinking of comparing the id generated by
generate-id() for div elements with the id of the div
element following next h3 but do not how to do
that(somehow use following-sibling::h3 and find the id
of the following div element).

Can anybody give me any pointers.


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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

Current Thread