Re: doc: add missing "id" attributes to extension packaging page
От | Karl O. Pinc |
---|---|
Тема | Re: doc: add missing "id" attributes to extension packaging page |
Дата | |
Msg-id | 20230117164313.1cc58709@slate.karlpinc.com обсуждение исходный текст |
Ответ на | Re: doc: add missing "id" attributes to extension packaging page (Brar Piening <brar@gmx.de>) |
Ответы |
Re: doc: add missing "id" attributes to extension packaging page
Re: doc: add missing "id" attributes to extension packaging page Re: doc: add missing "id" attributes to extension packaging page |
Список | pgsql-hackers |
On Tue, 17 Jan 2023 19:13:38 +0100 Brar Piening <brar@gmx.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@karlpinc.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein
Вложения
В списке pgsql-hackers по дате отправления: