On 24.02.2022 at 17:07, Brar Piening wrote:
> On 24.02.2022 at 16:46, Alvaro Herrera wrote:
>> Would it be possible to create such anchor links as part of the XSL
>> stylesheets for HTML?
>>
> I'll investiogate our options and report back.
>
Yes, that would be possible. In fact appending a link and optionally
adding a tiny bit of CSS like I show below does the trick.
The major problem in that regard would probably be my lack of
XSLT/docbook skills but if no one can jump in here, I can see if I can
make it work.
Obviously adding the links via javascript would also work (and even be
easier for me personally) but that seems like the second best solution
to me since it involves javascript where no javasript is needed.
Personally I consider having ids to link to and making them more
comfortable to use/find as orthogonal problems in that case (mostly
developer documentation) so IMHO solving this doesn't necessarily need
to hold back the original patch.
<dl class="variablelist">
<dt id="PROTOCOL-LOGICALREP-MESSAGE-FORMATS-INSERT">
<span class="term">Insert</span>
<a href="#PROTOCOL-LOGICALREP-MESSAGE-FORMATS-INSERT"
class="anchor">#</a></dt>
<dd>...</dd>
</dl>
<!-- Optional style to hide the links and make them visible on hover -->
<style>
.variablelist a.anchor {
visibility: hidden;
}
.variablelist *:hover > a.anchor,
.variablelist a.anchor:focus {
visibility: visible;
}
</style>