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 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] conditional looping in fo, David Carlisle | Thread | Re: [xsl] conditional looping in a , David Carlisle |
Re: [xsl] multiple template value i, David Carlisle | Date | Re: [xsl] Formatting XSL for XML to, David Carlisle |
Month |