Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJfCK-0007mx-5V for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Feb 2022 17:31:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJfCI-0002P1-RC for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Feb 2022 17:31:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJfCI-0002LO-Gj for pgsql-hackers@lists.postgresql.org; Mon, 14 Feb 2022 17:31:34 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJfCD-0003hj-Il for pgsql-hackers@postgresql.org; Mon, 14 Feb 2022 17:31:33 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 24CB15C018B; Mon, 14 Feb 2022 12:31:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 14 Feb 2022 12:31:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=36aXIR1czRxVUTUc+9Kr+4p3EaVP/Dv4qt1qAGs2r+I=; b=Z12Px9oU iuwIZtCDaqaiL5QWhM9Z1EQSm4wjaaalIPpCja5w++mvPPdvyvnF3dXe13vwr2ry kFgIW/tiUjl8Ueuo2Y6kyY2l5+k8Df8DwgvAwHrjo6MRhKsMOeR0X8RUYCNdTdqz ppnPiqUgidGU5c7D2HoT1GcwF6JAUZu/0/oJD9tPhcNsUPufNJz/K8uP+EooYo+W CaIwviTNb3TK4asme3FXd0c5snWh7PJN4sMCPuyHJmr+On3tVNVpqF0/ke60FSS8 KZ+sftX4RPxeXTTskZ1uw2sKFodPYpnyG6cCsyDcf2S4EH46FQdHt95o2D/NZMKR w7FU/lJ3x9KQOQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjedvgdeljecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefkffggfgfuvfhfhfgjtgfg sehtjeertddtfeejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvg htvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtohhmqeenucgg tffrrghtthgvrhhnpeeujedtuedtffeujeekveehieevffdtueekvefhtddvjeejjefhge elgfefhedttdenucffohhmrghinhepfiefrdhorhhgpdhsohhurhgtvghfohhrghgvrdhn vghtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepph gvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Feb 2022 12:31:26 -0500 (EST) Message-ID: Date: Mon, 14 Feb 2022 18:31:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: fixing bookindex.html bloat Content-Language: en-US To: Andres Freund , pgsql-hackers@postgresql.org References: <20220213201618.qz6p6noon3wagr3f@alap3.anarazel.de> From: Peter Eisentraut In-Reply-To: <20220213201618.qz6p6noon3wagr3f@alap3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 13.02.22 21:16, Andres Freund wrote: > The reason for the two xmlns= are different. The > xmlns="http://www.w3.org/1999/xhtml" is afaict caused by confusion on our > part. > > Some of our stylesheets use > xmlns="http://www.w3.org/TR/xhtml1/transitional" > others use > xmlns="http://www.w3.org/1999/xhtml" > > It's noteworthy that the docbook xsl stylesheets end up with > > so it's a bit pointless to reference http://www.w3.org/TR/xhtml1/transitional > afaict. > > Adding xmlns="http://www.w3.org/1999/xhtml" to stylesheet-html-common.xsl gets > rid of xmlns="http://www.w3.org/TR/xhtml1/transitional" in bookindex specific > content. > > Changing stylesheet.xsl from transitional to http://www.w3.org/1999/xhtml gets > rid of xmlns="http://www.w3.org/TR/xhtml1/transitional" in navigation/footer. > > Of course we should likely change all http://www.w3.org/TR/xhtml1/transitional > references, rather than just the one necessary to get rid of the xmlns= spam. Yeah, that is currently clearly wrong. It appears I originally copied the wrong namespace declarations from examples that show how to customize the DocBook stylesheets, but those examples were apparently wrong or outdated in this respect. It seems we also lack some namespace declarations altogether, as shown by your need to add it to stylesheet-html-common.xsl. This appears to need some careful cleanup. > The reason that we end up with so many more xmlns:xlink is just that without > our customization there ends up being a single >
> and then everything below that doesn't need the xmlns:xlink anymore. But > because stylesheet-html-common.xsl emits the div, the xmlns:xlink is emitted > for each element that autoidx.xsl has "control" over. > > Waiting for docbook to fix this seems a bit futile, I eventually found a > bugreport about this, from 2016: https://sourceforge.net/p/docbook/bugs/1384/ > > But we can easily reduce the "impact" of the issue, by just adding a single > xmlns:xlink to
, which is sufficient to convince xsltproc > to not repeat it. I haven't fully wrapped my head around this. I tried adding xlink to our own exclude-result-prefixes, but that didn't seem to have the right effect.