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>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, vignesh C <vignesh21(at)gmail(dot)com>, 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-04-14 17:41:23 |
Message-ID: | 20230414124123.7784ab00@slate.karlpinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 13 Apr 2023 10:53:31 -0500
"Karl O. Pinc" <kop(at)karlpinc(dot)com> wrote:
> On Thu, 13 Apr 2023 16:01:35 +0200
> Brar Piening <brar(at)gmx(dot)de> wrote:
>
> > On 13.04.2023 at 10:31, Peter Eisentraut wrote:
> > > Side project: I noticed that these new hover links don't appear in
> > > the single-page HTML output (make postgres.html), even though the
> > > generated HTML source code looks correct. Maybe someone has an
> > > idea there.
> > I feel responsible for the feature to work for all use cases where
> > it makes sense. I'll investigate this and post back.
>
> Looks to me like the ">" in the CSS was transformed into the >
> HTML entity when the stylesheet was included into the single-file
> HTML.
The XSLT 1.0 spec says that characters in <style> elements should
not be escaped when outputting HTML. [4] But (I think) the
generate.css.header parameter method [1][2] of
inserting the CSS into the HTML expands the CSS content
in an XML context, not a HTML context.
I've played around with it, going so far as to make stylesheet.css
look like:
--------------<snip>--------
<!DOCTYPE xsl:stylesheet [
<!ENTITY css SYSTEM "stylesheet.css">
]>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
&css;
</xsl:stylesheet>
--------------<snip>--------
and even substituted the actual text of stylesheet.css in
place of the &css; entity reference. In these cases the
"<" character is still entity expanded, resulting in broken CSS.
My conclusion is that this method is broken.
(The other possibility, I suppose, is that xsltproc is broken.)
I think the thing to try is the sagehill.net approach [4].
This overrides the user.head.content template. My hope is
that because the &css; entity is seen in a <style> element
in the template, that xsltproc then recognizances style element
content in a HTML output context.
(I don't know how xsltproc is supposed to know that it is
in a HTML output context. I suppose exploring this would
be another avenue should the above fail.)
1
https://docbook.sourceforge.net/release/xsl/current/doc/html/custom.css.source.html
2
https://docbook.sourceforge.net/release/xsl/current/doc/html/generate.css.header.html
3 http://sagehill.net/docbookxsl/HtmlHead.html#EmbedCSS
4 https://www.w3.org/TR/xslt-10/#section-HTML-Output-Method
Regards,
Karl <kop(at)karlpinc(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-04-14 17:47:32 | Re: Temporary tables versus wraparound... again |
Previous Message | Jacob Champion | 2023-04-14 17:34:36 | Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert |