This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Newbie trying to make htmlhelp.dsl modifications
- From: Peter Eisentraut <peter_e at gmx dot net>
- To: Thomas Søndergaard <ts at medical-insight dot com>,docbook-apps <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 8 Nov 2004 09:54:51 +0100
- Subject: Re: [docbook-apps] Newbie trying to make htmlhelp.dsl modifications
- References: <1099662677.5180.27.camel@localhost.localdomain>
Thomas Søndergaard wrote:
> (element indexterm
> (make sequence
> (make formatting-instruction data: "\less-than-sign;keyword")
>
> (make formatting-instruction data: (string-append " ref=\"" (href-to
> (current-node)) "\""))
>
> (make formatting-instruction data: "\greater-than-sign;")
>
> (process-children)
> An example of the problem I get is that for a particular section in
> the html generated from a docbook section with an indexterm I might
> have an anchor labeled AEN95, but the link I generate in the profile
> uses the anchor #AEN97.
You generate the link target using (href-to (current-node)), which
creates a link to the, well, current node, which is the indexterm in
that case. You probably want to link to the nearest containing
section. (It kind of makes sense, the section is node 95, the title
element is probably node 96, the indexterm is node 97.) Instead of
current-node, you need to work with the ancestor or ancestor-member
functions or use the zone attribute throughout, whichever may be
appropriate for your document.