[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

conditional looping in a for loop based on look ahead

Subject: 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)
div loop
First of all my apologies for the previous two
messages which were incomplete.

I am trying to apply stylesheet on following xml
structure.

<html>
<head>
</head>
<body>
  <h3>header1</h3>
  <div>xxxx</div>
  <div>yyy</div>
  <div>zzz</div>
  <foo>ppp</foo>
  <h3>header2</h3>
  <div>mmm</div>
  
</body>
</html>

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.

--Njs


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.