Re: make libpq documentation navigable between functions
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-07-22T12:10:22Z
Lists: pgsql-hackers
Attachments
- 0001-doc-Add-support-for-xref-to-command-and-function-ele.patch (text/plain) patch 0001
On 2019-07-10 09:51, Fabien COELHO wrote: >> One approach for making the currently non-monospaced ones into monospace >> would be to make the xref targets point to <function> elements >> but *don't* put xreflabels on those. > > I understand that you mean turning function usages: > > <function>PQbla</function> > > into: > > <xref linkend="libpq-fun-pqbla"/> > > so that it points to function definitions that would look like: > > <function id="libpq-fun-pqbla">PQbla</function>... > > (note: "libpq-pqbla" ids are already taken). What I really meant was that you determine the best link target in each case. If there already is an id on a <varlistentry>, then use that. If not, then make an id on something else, most likely the <function> element. What you have now puts ids on both the <varlistentry> and the <function>, which seems unnecessary and confusing. For some weird reason this setup with link targets in both <varlistentry> and enclosed <function> breaks the PDF build, but if you change it the way I suggest then those errors go away. >> This will currently produce a warning Don't know what gentext to create >> for xref to: "function" > > Indeed. > >> but we can write a template >> >> <xsl:template match="function" mode="xref-to"> >> >> and then we can control the output format of that. > > This step is (well) beyond my current XSLT proficiency, which is null > beyond knowing that it transforms XML into whatever. Also I'm unsure into > which of the 11 xsl file the definition should be included and what should > be written precisely. See attached patch. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
doc: Make libpq documentation navigable between functions
- e829337d42d0 13.0 landed
-
doc: Add support for xref to command and function elements
- 2e32a7711a8a 13.0 landed