[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Finding topmost element of a nested, nested list
As you'll see, I'm working on a process for print rendering. The basic idea is that images, along with their immediate level(s) and section, should start on a new page. A sample with the hoped for locations of the end-pages is shown below. I've been matching on level, looking for a descendant with matching criteria before starting the process (the vast majority won't need it), and outputting the end-page. I've been turning off the output when the level is a descendant of another level. This is okay for level 3 but it obviously won't work for level B which is the second child of the open level element. I've tried various combinations of ancestors, descendants and position() but still can't get this to work. Is this even possible with XSLT? Would I just need the RIGHT combination of ancestor, descendant and position() tests? Would changing the data model help? Any thoughts greatly appreciated. <chapter>1. <level>I. <level>A. <section>1</section> <section>2</section> </level> <!-- end-page here --> <level>B. <section>3 <image/> </section> </level> </level> <level>II. <level>A. <section>4</section> </level> <!-- end-page here --> <level>B. <section>5 <image/> </section> </level> </level> <!-- end-page here --> <level>III. <level>A. <section>6 <image/> </section> </level> </level> </chapter> Thanks again! --Steve XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|