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-17 22:43:13 |
Message-ID: | 20230117164313.1cc58709@slate.karlpinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 17 Jan 2023 19:13:38 +0100
Brar Piening <brar(at)gmx(dot)de> wrote:
> On 17.01.2023 at 14:12, Karl O. Pinc wrote:
> > If you're not willing to try I am willing to see if I can
> > produce an example to work from. My XSLT is starting to
> > come back.
>
> I'm certainly willing to try but I'd appreciate an example in any
> case.
It's good you asked. After poking about the XSLT 1.0 spec to refresh
my memory I abandoned the "mode" approach entirely. The real "right
way" is to use the import mechanism.
I've attached a patch that "wraps" the section.heading template
and adds extra stuff to the HTML output generated by the stock
template. (example_section_heading_override.patch)
There's a bug. All that goes into the html is a comment, not
a hoverable link. But the technique is clear.
On my system (Debian 11, bullseye) I found the URI to import
by looking at:
/usr/share/xml/docbook/stylesheet/docbook-xsl/catalog.xml
(Which is probably the right place to look.)
Ultimately, that file is findable via: /etc/xml/catalog
The "best way" on
Debian is: /usr/share/doc/docbook-xsl/README.gz
In other words, the README that comes with the style sheets.
Supposedly, the href=URLs are really URIs and will be good
no matter what/when. The XSLT processor should know to look
at the system catalogs and read the imported style sheet
from the local file system.
It might be useful to add --nonet to the xsltproc invocation(s)
in the Makefile(s). Just in case; to keep from retrieving
stylesheets from the net. (If the option is not already there.
I didn't look.)
If this is the first time that PG uses the XSLT import mechanism
I imagine that "things could go wrong" depending on what sort
of system is being used to build the docs. I'm not worried,
but it is something to note for the committer.
> My XSLT skills are mostly learning by doing combined with trial and
> error.
I think of XSLT as a functional programming language. Recursion is
a big deal, and data directed programming can be a powerful technique
because XSLT is so good with data structures.
(https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/full-text/book/book-Z-H-17.html#%_sec_2.4.3)
Regards,
Karl <kop(at)karlpinc(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Attachment | Content-Type | Size |
---|---|---|
example_section_heading_overrride.patch | text/x-patch | 3.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2023-01-17 22:43:59 | Re: [PoC] Federated Authn/z with OAUTHBEARER |
Previous Message | Peter Smith | 2023-01-17 22:37:37 | PGDOCS - sgml linkend using single-quotes |