internal table-of-contents section in an html document

I'm a new (novice) user of Amaya.  I really LIKE what I see so far!

Ok.  I notice that Amaya can do a 'view' called a table of contents.  It
appears it creates that view from a hierarchy of <h1>...<hN> tags or
something like that.

I also notice that a certain subset of W3C pages actually CONTAIN an
embedded table-of-contents (toc) near the top of the doc, and that one can
then
navigate thru such a large document either serially OR by clicking selected
items in the 'toc'.  Very cool.

So, before I go off and try writing some Java code to implement a program
that
could actually auto-generate and insert such a navigatible 'toc', I figured
we should
discuss the notion here a bit first.  The embedded 'toc' that I see, for
instance, in
    http://www.w3.org/TR/NOTE-amaya-970220.html
looks like it was 'generated' somehow, since all the anchors contain those
    #Lnnn
style references.  It would be do-able for a program, using XML (i.e.
requiring the input to
be XHTML), to compute line numbers and thus automate the process of creating
the toc
and to produce a new XHTML file with the generated 'toc' embedded at some
desired location
within the document.

So, my question becomes: Are there any [free] programs already out there
that do something
along these lines?  (I don't like re-inventing wheels that already exist.)

Received on Tuesday, 10 August 2004 15:00:16 UTC