common/common.xml is not include in manpages/docbook.xml as stated when strip-space was removed from manpage/other.xml. This results in leading whitespace being emitted when it shouldn't be and hence invalid nroff.
common/common.xml needs to be include in manpages/docbook.xml
Actually, common/common.xsl is already imported. The manpages/docbook.xsl file imports ../html/docbook.xsl, and that file imports ../common/common.xsl. I just tested the 1.79.1 (both namespaced and not namespaced) manpages/docbook.xsl and I don't see any invalid whitespace in the output. Can you provide a sample test file that illustrates the problem along with a description of how you processed it?
I concur that common/common.xml gets include however compare the output from the following
xsltproc ~/Downloads/docbook-xsl-1.78.1/manpages/docbook.xsl dnssec-keymgr.docbook
xsltproc ~/Downloads/docbook-xsl-1.79.1/manpages/docbook.xsl dnssec-keymgr.docbook
If you diff the resulting nroff you will note that there is two spaces before the '.SH "NAME"'
with 1.79.1 vs 1.78.1. I've attached dnssec-keymgr.docbook.
--- dnssec-keymgr.8-1.78.1 2016-07-05 12:05:52.000000000 +1000
+++ dnssec-keymgr.8-1.79.1 2016-07-05 12:06:06.000000000 +1000
@@ -1,7 +1,7 @@
'\" t
.\" Title: dnssec-keymgr
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.78.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.79.1 http://docbook.sf.net/
.\" Date: 2016-06-03
.\" Manual: BIND9
.\" Source: ISC
@@ -27,32 +27,65 @@
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
-.SH "NAME"
+
dnssec-keymgr - Ensures correct DNSKEY coverage for a zone based on a defined policy
-.SH "SYNOPSIS"
-.HP \w'\fBdnssec-keymgr\fR\ 'u
-\fBdnssec-keymgr\fR [\fB-K\ \fR\fB\fIdirectory\fR\fR] [\fB-c\ \fR\fB\fIfile\fR\fR] [\fB-f\fR] [\fB-k\fR] [\fB-q\fR] [\fB-v\fR] [\fB-z\fR] [\fB-g\ \fR\fB\fIpath\fR\fR] [\fB-r\ \fR\fB\fIpath\fR\fR] [\fB-s\ \fR\fB\fIpath\fR\fR] [zone...]
-.SH "DESCRIPTION"
-.PP
[rock:bind9/bin/python] marka% xsltproc --version
Using libxml 20904, libxslt 10128 and libexslt 817
xsltproc was compiled against libxml 20902, libxslt 10128 and libexslt 817
libxslt 10128 was compiled against libxml 20902
libexslt 817 was compiled against libxml 20902
[rock:bind9/bin/python] marka%
rock:bind9/bin/python] marka% xsltproc --load-trace ~/Downloads/docbook-xsl-1.79.1/manpages/docbook.xsl dnssec-keymgr.docbook
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/docbook.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/docbook.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/VERSION.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/param.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/lib/lib.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/l10n.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/common.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/utility.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/labels.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/titles.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/subtitles.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/gentext.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/targets.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/olink.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/pi.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/autotoc.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/autoidx.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/entities.ent" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/lists.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/callout.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/verbatim.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/graphics.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/xref.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/formal.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/table.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/table.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/htmltbl.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/sections.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/inline.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/entities.ent" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/footnote.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/html.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/its.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/info.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/keywords.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/division.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/toc.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/index.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/refentry.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/math.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/admon.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/component.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/biblio.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/biblio-iso690.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/glossary.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/entities.ent" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/block.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/task.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/qandaset.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/synop.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/titlepage.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/titlepage.templates.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/pi.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/ebnf.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/chunker.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/html-rtf.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/annotations.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/stripns.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/publishers.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/html/manifest.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/html-synop.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/refentry.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/charmap.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/param.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/utility.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/info.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/other.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/refentry.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/block.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/inline.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/synop.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/lists.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/endnotes.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/table.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/tbl.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/stripns.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/pi.xsl" ID="(null)"
Loaded URL="dnssec-keymgr.docbook" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/VERSION.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/l10n.xsl" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/l10n.xml" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/l10n.dtd" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/common/en.xml" ID="(null)"
Loaded URL="/Users/marka/Downloads/docbook-xsl-1.79.1/manpages/charmap.groff.xsl" ID="(null)"
Note: namesp. cut : stripped namespace before processing dnssec-keymgr
Note: meta manual : no titled ancestor of refentry dnssec-keymgr
Note: meta manual : no refentry/refmeta/refmiscinfo@class=manual dnssec-keymgr
Note: meta manual : see http://docbook.sf.net/el/refmiscinfo dnssec-keymgr
Warn: meta manual : using "BIND9" for "manual" dnssec-keymgr
Note: Writing dnssec-keymgr.8
[rock:bind9/bin/python] marka%
OK, thanks for the sample file and especially the command you used to process it. This seems to be a problem with the mechanism that strips the namespace from the document before processing it. Your command example shows that you are using the non-namespaced stylesheets on a DocBook 5 document. This message at the start of the process:
Note: namesp. cut : stripped namespace before processing dnssec-keymgr
indicates that step to remove the namespace is being taken before the document can be processed with the non-namespaced stylesheet. That process applies templates to the original document to remove the namespace from each element and save the result to memory, and then it processes the image in memory with the non-namespaced templates. That copying process seems to be not working correctly in 1.79.1.
When I process your document with the -ns- version of the 1.79.1 manpage stylesheet, it produces the correct nroff without extra whitespace. That's your workaround for this issue. I will continue to investigate the problem to correct it for the next release.
I could duplicate the problem by converting your document to DocBook 4 and then processing it with the namespaced stylesheet, which does the opposite (adds the namespace before processing). I traced the problem to how the element names in <xsl:strip-space> (from common/common.xsl) don't work if they don't match the namespace of the original document, before namespace fixup.</xsl:strip-space>
If the non-namespaced stylesheet includes another xsl:strip-space with namespaced element names, it works correctly with namespaced documents:
<xsl:strip-space elements="
d:abstract d:affiliation d:anchor d:answer d:appendix d:area d:areaset d:areaspec
...
The solution for the next release is to include both versions of xsl:strip-space in both kinds of stylesheets.