git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 5/6] manpage-normal.xsl: fold in manpage-base.xsl

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Mar 29, 2020, 13:18 UTC
Message-ID
<defc062a32307fee8b36cfdd8a60a6843a2f6260.1585486103.git.martin.agren@gmail.com>
In-Reply-To
<cover.1585486103.git.martin.agren@gmail.com>

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>
---
 Documentation/manpage-base.xsl   | 35 --------------------------------
 Documentation/manpage-normal.xsl | 22 ++++++++++++++++----
 2 files changed, 18 insertions(+), 39 deletions(-)
 delete mode 100644 Documentation/manpage-base.xsl
diff --git a/Documentation/manpage-base.xsl b/Documentation/manpage-base.xsl
deleted file mode 100644
index a264fa6160..0000000000
--- a/Documentation/manpage-base.xsl
+++ /dev/null
@@ -1,35 +0,0 @@
-<!-- manpage-base.xsl:
-     special formatting for manpages rendered from asciidoc+docbook -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-		version="1.0">
-
-<!-- these params silence some output from xmlto -->
-<xsl:param name="man.output.quietly" select="1"/>
-<xsl:param name="refentry.meta.get.quietly" select="1"/>
-
-<!-- convert asciidoc callouts to man page format;
-     git.docbook.backslash and git.docbook.dot params
-     must be supplied by another XSL file or other means -->
-<xsl:template match="co">
-	<xsl:value-of select="concat(
-			      $git.docbook.backslash,'fB(',
-			      substring-after(@id,'-'),')',
-			      $git.docbook.backslash,'fR')"/>
-</xsl:template>
-<xsl:template match="calloutlist">
-	<xsl:value-of select="$git.docbook.dot"/>
-	<xsl:text>sp&#10;</xsl:text>
-	<xsl:apply-templates/>
-	<xsl:text>&#10;</xsl:text>
-</xsl:template>
-<xsl:template match="callout">
-	<xsl:value-of select="concat(
-			      $git.docbook.backslash,'fB',
-			      substring-after(@arearefs,'-'),
-			      '. ',$git.docbook.backslash,'fR')"/>
-	<xsl:apply-templates/>
-	<xsl:value-of select="$git.docbook.dot"/>
-	<xsl:text>br&#10;</xsl:text>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/Documentation/manpage-normal.xsl b/Documentation/manpage-normal.xsl
index c9c68a0542..a9c7ec69f4 100644
--- a/Documentation/manpage-normal.xsl
+++ b/Documentation/manpage-normal.xsl
@@ -3,10 +3,24 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 		version="1.0">
 
-<xsl:import href="manpage-base.xsl"/>
 
-<!-- these are the normal values for the roff control characters -->
-<xsl:param name="git.docbook.backslash">\</xsl:param>
-<xsl:param name="git.docbook.dot"	>.</xsl:param>
+<!-- these params silence some output from xmlto -->
+<xsl:param name="man.output.quietly" select="1"/>
+<xsl:param name="refentry.meta.get.quietly" select="1"/>
+
+<!-- convert asciidoc callouts to man page format -->
+<xsl:template match="co">
+	<xsl:value-of select="concat('\fB(',substring-after(@id,'-'),')\fR')"/>
+</xsl:template>
+<xsl:template match="calloutlist">
+	<xsl:text>.sp&#10;</xsl:text>
+	<xsl:apply-templates/>
+	<xsl:text>&#10;</xsl:text>
+</xsl:template>
+<xsl:template match="callout">
+	<xsl:value-of select="concat('\fB',substring-after(@arearefs,'-'),'. \fR')"/>
+	<xsl:apply-templates/>
+	<xsl:text>.br&#10;</xsl:text>
+</xsl:template>
 
 </xsl:stylesheet>
-- 
2.26.0
Previous: Martin ÅgrenNext: Martin Ågren
Message 6 of 16 in “Doc: drop support for docbook-xsl before 1.74”
  1. 0/6 Doc: drop support for docbook-xsl before 1.74Martin Ågren, Mar 29, 2020
  2. 1/6 Doc: drop support for docbook-xsl before 1.71.1Martin Ågren, Mar 29, 2020
  3. 2/6 Doc: drop support for docbook-xsl before 1.72.0Martin Ågren, Mar 29, 2020
  4. 3/6 Doc: drop support for docbook-xsl before 1.73.0Martin Ågren, Mar 29, 2020
  5. 4/6 manpage-bold-literal.xsl: stop using git.docbook.backslashMartin Ågren, Mar 29, 2020
  6. 5/6 manpage-normal.xsl: fold in manpage-base.xslMartin Ågren, Mar 29, 2020
  7. 6/6 INSTALL: drop support for docbook-xsl before 1.74Martin Ågren, Mar 29, 2020
  8. Jeff KingMar 30, 2020
  9. Junio C HamanoMar 29, 2020
  10. Jeff KingMar 30, 2020
  11. Martin ÅgrenMar 31, 2020
  12. Jeff KingApr 1, 2020
  13. Junio C HamanoApr 1, 2020
  14. brian m. carlsonApr 2, 2020
  15. Junio C HamanoApr 2, 2020
  16. brian m. carlsonMar 30, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.