Re: Add id's to various elements in protocol.sgml - Mailing list pgsql-hackers

From Brar Piening
Subject Re: Add id's to various elements in protocol.sgml
Date
Msg-id 68b9c435-d017-93cc-775a-c604db9ec683@gmx.de
Whole thread Raw
In response to Re: Add id's to various elements in protocol.sgml  (Brar Piening <brar@gmx.de>)
Responses Re: Add id's to various elements in protocol.sgml  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Re: Add id's to various elements in protocol.sgml  (Brar Piening <brar@gmx.de>)
List pgsql-hackers
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>




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Design of pg_stat_subscription_workers vs pgstats
Next
From: Julien Rouhaud
Date:
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers