discuss: Re: In HTML, "render" all headings as anchors
Subject:
Re: RFE: In HTML, "render" all headings as anchors
From:
David Merrill ####@####.####
Date:
22 Mar 2002 02:16:18 -0000
Message-Id: <20020322030815.GH8825@lupercalia.net>
On Fri, Mar 22, 2002 at 12:27:00PM +1030, David Lloyd wrote:
>
> David et al:
>
> >>My intent is to link to these headings from other webpages.
> >>
> >
> >We can ask all authors to add id attributes for all of their sections.
> >I can't think of anything else we can do.
>
> Hack the stylesheets ;-P
>
> It wouldn't be too hard if you know what you were doing. Pseudo code
> would be:
>
> * process nodes
> * if node matches [whatever] and node does not already contain ID
> attribute then:
> - create uniqueid
> - add this attribute to the thingo
>
> And have an easy way to turn this on/off...
Yes, that's easy. What's harder is making the IDs predictable enough
that other docs can link to them without fear that the ID will change.
I just wrote texi2db. Believe me, I have a healthy respect for this
problem.
--
David C. Merrill http://www.lupercalia.net
Linux Documentation Project ####@####.####
Lead Developer http://www.linuxdoc.org
An analogy [of Microsoft] would be the owner of a toll bridge, which is the
only bridge across a river, paying the owner of land to deny access to a
site where a competitive bridge is partly built.
--Judge Robert Bork, former US Supreme Court nominee