Thomas S鷢dergaard 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.