Subject: Re: [xsl] Finding topmost element of a nested, nested list From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 29 Oct 2003 12:47:05 -0500 |
<level>I. <level>A. <section>1</section> <section>2</section> </level> <!-- end-page here? --> <level>B. <section>3</section> <section>4 <image/> </section> </level> </level>
Cheers, Wendell
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>
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Finding topmost element o, David Carlisle | Thread | [xsl] namespaces problem, belangour abdessamad |
Re: [xsl] logical operators in *tes, W. Eliot Kimber | Date | [xsl] Creating then using elements , Kathy Burke |
Month |