File 0002-Also-use-DocBook-5-stylesheet-when-generating-HTML-o.patch of Package git.18617

From c83742bc6a8e0662aafa6a0fb3779fa3e333ee24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Fri, 29 Nov 2019 15:53:38 +0100
Subject: [PATCH 2/2] Also use DocBook 5 stylesheet when generating HTML output

xsl/current refers to DocBook 4, while DocBook 5 uses xsl-ns/current.

Make sure the stylesheet is also used for contrib/subtree, as xmlto
otherwise defaults to DocBook 4.
---
 Documentation/Makefile     | 4 +++-
 Documentation/docbook5.xsl | 8 ++++++++
 contrib/subtree/Makefile   | 3 ++-
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/docbook5.xsl

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 06d85ad..606b00f 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -205,6 +205,9 @@ ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
 DBLATEX_COMMON =
 XMLTO_EXTRA += --skip-validation
 XMLTO_EXTRA += -x manpage.xsl
+XSLT = docbook5.xsl
+else
+XSLT = docbook.xsl
 endif
 
 SHELL_PATH ?= $(SHELL)
@@ -397,7 +400,6 @@ $(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.tx
 SubmittingPatches.txt: SubmittingPatches
 	$(QUIET_GEN) cp $< $@
 
-XSLT = docbook.xsl
 XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
 
 user-manual.html: user-manual.xml $(XSLT)
diff --git a/Documentation/docbook5.xsl b/Documentation/docbook5.xsl
new file mode 100644
index 0000000..ab95b94
--- /dev/null
+++ b/Documentation/docbook5.xsl
@@ -0,0 +1,8 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+		version='1.0'>
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/html/docbook.xsl"/>
+ <xsl:output method="html"
+     encoding="UTF-8" indent="no"
+     doctype-public="-//W3C//DTD HTML 4.01//EN"
+     doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
+</xsl:stylesheet>
diff --git a/contrib/subtree/Makefile b/contrib/subtree/Makefile
index 09e53b9..5905a31 100644
--- a/contrib/subtree/Makefile
+++ b/contrib/subtree/Makefile
@@ -25,7 +25,6 @@ ASCIIDOC_HTML    = xhtml11
 ASCIIDOC_DOCBOOK = docbook
 ASCIIDOC_EXTRA   =
 XMLTO            = xmlto
-XMLTO_EXTRA      = --skip-validation
 
 ifdef USE_ASCIIDOCTOR
 ASCIIDOC         = asciidoctor
@@ -34,6 +33,8 @@ ASCIIDOC_HTML    = xhtml5
 ASCIIDOC_DOCBOOK = docbook5
 ASCIIDOC_EXTRA  += -I../../Documentation -rasciidoctor-extensions
 ASCIIDOC_EXTRA  += -alitdd='&\#x2d;&\#x2d;'
+XMLTO_EXTRA     += --skip-validation
+XMLTO_EXTRA     += -x ../../Documentation/manpage.xsl
 endif
 
 ifndef SHELL_PATH
-- 
2.24.0

openSUSE Build Service is sponsored by