@matheusbsbs / matheus-bagliano / commits / 2346431e47
Fork 0

Documentation: use "spurious .sp" XSLT if DOCBOOK_SUPPRESS_SP is set

With this change, the "spurious .sp" suppression XSLT code is disabled by default. It can be enabled by defining DOCBOOK_SUPPRESS_SP. The "spurious .sp" XSLT fragment was used to work around a bug first released in docbook-xsl 1.69.1. Modern versions of docbook-xsl are negatively affected by the code (some empty lines are omitted from manpage output; see <http://article.gmane.org/gmane.comp.version-control.git/115302>). The key revisions in the docbook SVN repo seem to be 5144 (before docbook-xsl 1.69.1) and 6359 (before docbook-xsl 1.71.1). Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0. Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Chris Johnsen committed Apr 1, 2009 at 03:50 UTC 2346431e476ab9f095f0dd2921f63fa071039bb8
4 files changed +32 -14
Documentation/Makefile
+6 -1
@@ -69,7 +69,9 @@ endif
69 #
70 # For docbook-xsl ...
71 # -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0)
72 -# 1.69.0-1.71.1, no extra settings are needed?
72 +# 1.69.0, no extra settings are needed?
73 +# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP?
74 +# 1.71.1, no extra settings are needed?
75 # 1.72.0, set DOCBOOK_XSL_172.
76 # 1.73.0-, set ASCIIDOC_NO_ROFF
77 #
@@ -97,6 +99,9 @@ endif
99 ifdef MAN_BOLD_LITERAL
100 XMLTO_EXTRA += -m manpage-bold-literal.xsl
101 endif
102 +ifdef DOCBOOK_SUPPRESS_SP
103 +XMLTO_EXTRA += -m manpage-suppress-sp.xsl
104 +endif
105
106 #
107 # Please note that there is a minor bug in asciidoc.
Documentation/RelNotes-1.6.3.txt
+5
@@ -102,6 +102,11 @@ Updates since v1.6.2
102 * Makefile learned 'coverage' option to run the test suites with
103 coverage tracking enabled.
104
105 +* Building the manpages with docbook-xsl between 1.69.1 and 1.71.1 now
106 + requires setting DOCBOOK_SUPPRESS_SP to work around a docbook-xsl bug.
107 + This workaround used to be enabled by default, but causes problems
108 + with newer versions of docbook-xsl.
109 +
110 Fixes since v1.6.2
111 ------------------
112
Documentation/manpage-base.xsl
-13
@@ -32,17 +32,4 @@
32 <xsl:text>br&#10;</xsl:text>
33 </xsl:template>
34
35 -<!-- attempt to work around spurious .sp at the tail of the line
36 - that docbook stylesheets seem to add -->
37 -<xsl:template match="simpara">
38 - <xsl:variable name="content">
39 - <xsl:apply-templates/>
40 - </xsl:variable>
41 - <xsl:value-of select="normalize-space($content)"/>
42 - <xsl:if test="not(ancestor::authorblurb) and
43 - not(ancestor::personblurb)">
44 - <xsl:text>&#10;&#10;</xsl:text>
45 - </xsl:if>
46 -</xsl:template>
47 -
35 </xsl:stylesheet>
Documentation/manpage-suppress-sp.xsl new
+21
@@ -0,0 +1,21 @@
1 +<!-- manpage-suppress-sp.xsl:
2 + special settings for manpages rendered from asciidoc+docbook
3 + handles erroneous, inline .sp in manpage output of some
4 + versions of docbook-xsl -->
5 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 + version="1.0">
7 +
8 +<!-- attempt to work around spurious .sp at the tail of the line
9 + that some versions of docbook stylesheets seem to add -->
10 +<xsl:template match="simpara">
11 + <xsl:variable name="content">
12 + <xsl:apply-templates/>
13 + </xsl:variable>
14 + <xsl:value-of select="normalize-space($content)"/>
15 + <xsl:if test="not(ancestor::authorblurb) and
16 + not(ancestor::personblurb)">
17 + <xsl:text>&#10;&#10;</xsl:text>
18 + </xsl:if>
19 +</xsl:template>
20 +
21 +</xsl:stylesheet>