@matheusbsbs / matheus-bagliano / commits / f7421a1438
Fork 0

manpage-normal.xsl: fold in manpage-base.xsl

After an earlier commit, we only include manpage-base.xsl from a single file, manpage-normal.xsl. Fold the former into the latter. We only ever needed the "base, normal and non-normal" construct to support a single non-normal case, namely to work around issues with docbook-xsl 1.72 handling backslashes and dots. If we ever need something like this again, we can re-introduce manpage-base.xsl and friends. Whatever issue we'd be trying to work around, it probably wouldn't involve dots and backslashes like this, anyway. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Martin Ågren committed Mar 29, 2020 at 15:18 UTC f7421a14387e4d4e45e2ce579dc941f33e4ff8d9
2 files changed +18 -39
Documentation/manpage-base.xsl deleted
-35
@@ -1,35 +0,0 @@
1 -<!-- manpage-base.xsl:
2 - special formatting for manpages rendered from asciidoc+docbook -->
3 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 - version="1.0">
5 -
6 -<!-- these params silence some output from xmlto -->
7 -<xsl:param name="man.output.quietly" select="1"/>
8 -<xsl:param name="refentry.meta.get.quietly" select="1"/>
9 -
10 -<!-- convert asciidoc callouts to man page format;
11 - git.docbook.backslash and git.docbook.dot params
12 - must be supplied by another XSL file or other means -->
13 -<xsl:template match="co">
14 - <xsl:value-of select="concat(
15 - $git.docbook.backslash,'fB(',
16 - substring-after(@id,'-'),')',
17 - $git.docbook.backslash,'fR')"/>
18 -</xsl:template>
19 -<xsl:template match="calloutlist">
20 - <xsl:value-of select="$git.docbook.dot"/>
21 - <xsl:text>sp&#10;</xsl:text>
22 - <xsl:apply-templates/>
23 - <xsl:text>&#10;</xsl:text>
24 -</xsl:template>
25 -<xsl:template match="callout">
26 - <xsl:value-of select="concat(
27 - $git.docbook.backslash,'fB',
28 - substring-after(@arearefs,'-'),
29 - '. ',$git.docbook.backslash,'fR')"/>
30 - <xsl:apply-templates/>
31 - <xsl:value-of select="$git.docbook.dot"/>
32 - <xsl:text>br&#10;</xsl:text>
33 -</xsl:template>
34 -
35 -</xsl:stylesheet>
Documentation/manpage-normal.xsl
+18 -4
@@ -3,10 +3,24 @@
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 version="1.0">
5
6 -<xsl:import href="manpage-base.xsl"/>
6
8 -<!-- these are the normal values for the roff control characters -->
9 -<xsl:param name="git.docbook.backslash">\</xsl:param>
10 -<xsl:param name="git.docbook.dot" >.</xsl:param>
7 +<!-- these params silence some output from xmlto -->
8 +<xsl:param name="man.output.quietly" select="1"/>
9 +<xsl:param name="refentry.meta.get.quietly" select="1"/>
10 +
11 +<!-- convert asciidoc callouts to man page format -->
12 +<xsl:template match="co">
13 + <xsl:value-of select="concat('\fB(',substring-after(@id,'-'),')\fR')"/>
14 +</xsl:template>
15 +<xsl:template match="calloutlist">
16 + <xsl:text>.sp&#10;</xsl:text>
17 + <xsl:apply-templates/>
18 + <xsl:text>&#10;</xsl:text>
19 +</xsl:template>
20 +<xsl:template match="callout">
21 + <xsl:value-of select="concat('\fB',substring-after(@arearefs,'-'),'. \fR')"/>
22 + <xsl:apply-templates/>
23 + <xsl:text>.br&#10;</xsl:text>
24 +</xsl:template>
25
26 </xsl:stylesheet>