[xsl] html toc

Subject: [xsl] html toc
From: carst@xxxxxxxxxx
Date: Wed, 23 Feb 2005 12:38:40 -0500
I don't know how to do this.

<h1>first level</h1>
<h3>third o</h3>
<h1>first o</h1>

currently this is transformed into a ToC using a table where
i make use of a <xsl:choose> and test for element name
(h1, h2, h3) and insert the appropriate columns to have
indention between the headline levels. 

i want to improve the ToC and make it into a menu which
uses the css 'display:none' and javascript to toggleDisplay.
for this, it would be much easier to have a list instead of a
table. would look like this: 

<li>first level</li>
<li>third o</li>
<li>first o</li>

my problem is that all the headline elements are part of the
same axis and i don't know how do the transformation without
something like a 'break loop', or 'select all following 'h3' until
the next 'h2' or 'h1'.

any ideas?

Carsten Heinrigs
Ocean-7 Development
Tel: 212 533-8460

Current Thread