Re: doc: add missing "id" attributes to extension packaging page

From: "Karl O(dot) Pinc" <kop(at)karlpinc(dot)com>
To: Brar Piening <brar(at)gmx(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, vignesh C <vignesh21(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: doc: add missing "id" attributes to extension packaging page
Date: 2023-01-16 00:28:24
Message-ID: 20230115182824.78efafb0@slate.karlpinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 15 Jan 2023 18:01:50 -0600
"Karl O. Pinc" <kop(at)karlpinc(dot)com> wrote:

> Regards XSLT:
>
> I believe the XSLT needs work.

I also think that the XSLT should error and halt
when there's no id (in the expected places).
Instead of just giving a warning and keeping going. Otherwise
they'll constantly be ignored warnings and periodically
there will have to be patches to supply missing ids.

To solve the "which id is missing where so I can fix it"
problem, I propose the error text show the chapter title,
all the enclosing sub-section titles, and any previous existing
varlistentry ids occurring before the tag with the
missing attribute. At least for varlistentry-s. For
sections you could do chapter and enclosing sub-section
titles and the title of the section with the problem.
That should be enough for an author to find the place
in the source sgml that needs fixing.

Maybe, possibly, you can see how this is done by looking
at whatever XSLT there is that automatically generates
ids for sections without ids, so that the table of contents
have something to link to. In any case, XSLT is really
good at "looking at" parent/enclosing XML, so producing
a useful error message shouldn't be _that_ hard. I've
definitely done this sort of thing before so I can tell you
it's readily doable.

Regards,

Karl <kop(at)karlpinc(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-01-16 00:49:01 Re: The documentation for storage type 'plain' actually allows single byte header
Previous Message Karl O. Pinc 2023-01-16 00:01:50 Re: doc: add missing "id" attributes to extension packaging page