public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Andres Freund <[email protected]>
To: [email protected]
Subject: Re: fixing bookindex.html bloat
Date: Mon, 14 Feb 2022 23:06:20 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>


On 14.02.22 18:31, Peter Eisentraut wrote:
> 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 attached patch cleans up the xhtml namespace declarations properly, 
I think.

For the xlink business, I don't have a better idea than you, so your 
workaround proposal seems fine.
From 45d361e0bc7bd89b41880eb83cdccabf5626b71c Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Mon, 14 Feb 2022 22:56:11 +0100
Subject: [PATCH] Fix XML namespace declarations

---
 doc/src/sgml/stylesheet-hh.xsl           | 4 +---
 doc/src/sgml/stylesheet-html-common.xsl  | 3 ++-
 doc/src/sgml/stylesheet-html-nochunk.xsl | 4 +---
 doc/src/sgml/stylesheet-text.xsl         | 3 +--
 doc/src/sgml/stylesheet.xsl              | 3 +--
 5 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/doc/src/sgml/stylesheet-hh.xsl b/doc/src/sgml/stylesheet-hh.xsl
index 1b1ab4bbe9..6f4b706dac 100644
--- a/doc/src/sgml/stylesheet-hh.xsl
+++ b/doc/src/sgml/stylesheet-hh.xsl
@@ -1,8 +1,6 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
-                version='1.0'
-                xmlns="http://www.w3.org/TR/xhtml1/transitional";
-                exclude-result-prefixes="#default">
+                version='1.0'>
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"/;
 <xsl:include href="stylesheet-common.xsl" />
diff --git a/doc/src/sgml/stylesheet-html-common.xsl b/doc/src/sgml/stylesheet-html-common.xsl
index d9961089c6..96dd2cc038 100644
--- a/doc/src/sgml/stylesheet-html-common.xsl
+++ b/doc/src/sgml/stylesheet-html-common.xsl
@@ -4,7 +4,8 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
-                version="1.0">
+                version="1.0"
+                xmlns="http://www.w3.org/1999/xhtml";
 
 <!--
   This file contains XSLT stylesheet customizations that are common to
diff --git a/doc/src/sgml/stylesheet-html-nochunk.xsl b/doc/src/sgml/stylesheet-html-nochunk.xsl
index 78add26a9f..8167127b93 100644
--- a/doc/src/sgml/stylesheet-html-nochunk.xsl
+++ b/doc/src/sgml/stylesheet-html-nochunk.xsl
@@ -1,8 +1,6 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
-                version='1.0'
-                xmlns="http://www.w3.org/TR/xhtml1/transitional";
-                exclude-result-prefixes="#default">
+                version='1.0'>
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/;
 <xsl:include href="stylesheet-common.xsl" />
diff --git a/doc/src/sgml/stylesheet-text.xsl b/doc/src/sgml/stylesheet-text.xsl
index 476b871870..529cc9ec38 100644
--- a/doc/src/sgml/stylesheet-text.xsl
+++ b/doc/src/sgml/stylesheet-text.xsl
@@ -1,8 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 version='1.0'
-                xmlns="http://www.w3.org/TR/xhtml1/transitional";
-                exclude-result-prefixes="#default">
+                xmlns="http://www.w3.org/1999/xhtml";
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/;
 <xsl:import href="stylesheet-common.xsl" />
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index 0eac594f0c..b6141303ab 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -1,8 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 version='1.0'
-                xmlns="http://www.w3.org/TR/xhtml1/transitional";
-                exclude-result-prefixes="#default">
+                xmlns="http://www.w3.org/1999/xhtml";
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/;
 <xsl:include href="stylesheet-common.xsl" />
-- 
2.35.1



Attachments:

  [text/plain] 0001-Fix-XML-namespace-declarations.patch (3.5K, ../[email protected]/2-0001-Fix-XML-namespace-declarations.patch)
  download | inline diff:
From 45d361e0bc7bd89b41880eb83cdccabf5626b71c Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <[email protected]>
Date: Mon, 14 Feb 2022 22:56:11 +0100
Subject: [PATCH] Fix XML namespace declarations

---
 doc/src/sgml/stylesheet-hh.xsl           | 4 +---
 doc/src/sgml/stylesheet-html-common.xsl  | 3 ++-
 doc/src/sgml/stylesheet-html-nochunk.xsl | 4 +---
 doc/src/sgml/stylesheet-text.xsl         | 3 +--
 doc/src/sgml/stylesheet.xsl              | 3 +--
 5 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/doc/src/sgml/stylesheet-hh.xsl b/doc/src/sgml/stylesheet-hh.xsl
index 1b1ab4bbe9..6f4b706dac 100644
--- a/doc/src/sgml/stylesheet-hh.xsl
+++ b/doc/src/sgml/stylesheet-hh.xsl
@@ -1,8 +1,6 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'
-                xmlns="http://www.w3.org/TR/xhtml1/transitional"
-                exclude-result-prefixes="#default">
+                version='1.0'>
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"/>
 <xsl:include href="stylesheet-common.xsl" />
diff --git a/doc/src/sgml/stylesheet-html-common.xsl b/doc/src/sgml/stylesheet-html-common.xsl
index d9961089c6..96dd2cc038 100644
--- a/doc/src/sgml/stylesheet-html-common.xsl
+++ b/doc/src/sgml/stylesheet-html-common.xsl
@@ -4,7 +4,8 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+                version="1.0"
+                xmlns="http://www.w3.org/1999/xhtml">
 
 <!--
   This file contains XSLT stylesheet customizations that are common to
diff --git a/doc/src/sgml/stylesheet-html-nochunk.xsl b/doc/src/sgml/stylesheet-html-nochunk.xsl
index 78add26a9f..8167127b93 100644
--- a/doc/src/sgml/stylesheet-html-nochunk.xsl
+++ b/doc/src/sgml/stylesheet-html-nochunk.xsl
@@ -1,8 +1,6 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'
-                xmlns="http://www.w3.org/TR/xhtml1/transitional"
-                exclude-result-prefixes="#default">
+                version='1.0'>
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
 <xsl:include href="stylesheet-common.xsl" />
diff --git a/doc/src/sgml/stylesheet-text.xsl b/doc/src/sgml/stylesheet-text.xsl
index 476b871870..529cc9ec38 100644
--- a/doc/src/sgml/stylesheet-text.xsl
+++ b/doc/src/sgml/stylesheet-text.xsl
@@ -1,8 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version='1.0'
-                xmlns="http://www.w3.org/TR/xhtml1/transitional"
-                exclude-result-prefixes="#default">
+                xmlns="http://www.w3.org/1999/xhtml">
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
 <xsl:import href="stylesheet-common.xsl" />
diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index 0eac594f0c..b6141303ab 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -1,8 +1,7 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 version='1.0'
-                xmlns="http://www.w3.org/TR/xhtml1/transitional"
-                exclude-result-prefixes="#default">
+                xmlns="http://www.w3.org/1999/xhtml">
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
 <xsl:include href="stylesheet-common.xsl" />
-- 
2.35.1



view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: fixing bookindex.html bloat
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox