Re: Add id's to various elements in protocol.sgml

From: Brar Piening <brar(at)gmx(dot)de>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add id's to various elements in protocol.sgml
Date: 2022-02-25 05:36:52
Message-ID: 68b9c435-d017-93cc-775a-c604db9ec683@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-02-25 06:25:52 Re: [PATCH] Expose port->authn_id to extensions and triggers
Previous Message Amit Kapila 2022-02-25 05:26:47 Re: Design of pg_stat_subscription_workers vs pgstats