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

[PATCH v4 02/12] doc: use --stringparam in xmlto

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 8, 2021, 09:00 UTC
Message-ID
<20210608090026.1737348-3-felipe.contreras@gmail.com>
In-Reply-To
<20210608090026.1737348-1-felipe.contreras@gmail.com>

Commit 50d9bbba92 (Documentation: Avoid use of xmlto --stringparam, 2009-12-04) introduced manpage-base-url.xsl because ancient versions of xmlto did not have --stringparam.

However, that was more than ten years ago, no need for that complexity anymore.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/.gitignore              |  1 -
 Documentation/Makefile                |  8 ++------
 Documentation/manpage-base-url.xsl.in | 10 ----------
 3 files changed, 2 insertions(+), 17 deletions(-)
 delete mode 100644 Documentation/manpage-base-url.xsl.in
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index 9022d48355..e9f8d693b1 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -10,7 +10,6 @@ howto-index.txt
 doc.dep
 cmds-*.txt
 mergetools-*.txt
-manpage-base-url.xsl
 SubmittingPatches.txt
 tmp-doc-diff/
 GIT-ASCIIDOCFLAGS
diff --git a/Documentation/Makefile b/Documentation/Makefile
index bf1f66b3eb..84643a34e9 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -176,7 +176,7 @@ endif
 ifndef MAN_BASE_URL
 MAN_BASE_URL = file://$(htmldir)/
 endif
-XMLTO_EXTRA += -m manpage-base-url.xsl
+XMLTO_EXTRA += --stringparam man.base.url.for.relative.links='$(MAN_BASE_URL)'
 
 ifdef USE_ASCIIDOCTOR
 ASCIIDOC = asciidoctor
@@ -342,7 +342,6 @@ clean:
 	$(RM) technical/*.html technical/api-index.txt
 	$(RM) SubmittingPatches.txt
 	$(RM) $(cmds_txt) $(mergetools_txt) *.made
-	$(RM) manpage-base-url.xsl
 	$(RM) GIT-ASCIIDOCFLAGS
 
 $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)
@@ -351,10 +350,7 @@ $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)
 $(OBSOLETE_HTML): %.html : %.txto $(ASCIIDOC_DEPS)
 	$(QUIET_ASCIIDOC)$(TXT_TO_HTML) -o $@ $<
 
-manpage-base-url.xsl: manpage-base-url.xsl.in
-	$(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
-
-%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)
+%.1 %.5 %.7 : %.xml $(wildcard manpage*.xsl)
 	$(QUIET_XMLTO)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
 
 %.xml : %.txt $(ASCIIDOC_DEPS)
diff --git a/Documentation/manpage-base-url.xsl.in b/Documentation/manpage-base-url.xsl.in
deleted file mode 100644
index e800904df3..0000000000
--- a/Documentation/manpage-base-url.xsl.in
+++ /dev/null
@@ -1,10 +0,0 @@
-<!-- manpage-base-url.xsl:
-     special settings for manpages rendered from newer docbook -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-		version="1.0">
-
-<!-- set a base URL for relative links -->
-<xsl:param name="man.base.url.for.relative.links"
-	>@@MAN_BASE_URL@@</xsl:param>
-
-</xsl:stylesheet>
-- 
2.32.0.2.g41be0a4e50
Previous: Felipe ContrerasNext: Felipe Contreras
Message 2 of 13 in “doc: cleanup old cruft and asciidoctor revamp”
  1. 00/12 doc: cleanup old cruft and asciidoctor revampFelipe Contreras, Jun 8, 2021
  2. 02/12 doc: use --stringparam in xmltoFelipe Contreras, Jun 8, 2021
  3. 01/12 doc: remove GNU troff workaroundFelipe Contreras, Jun 8, 2021
  4. 04/12 doc: asciidoc: remove unnecessary attributeFelipe Contreras, Jun 8, 2021
  5. 05/12 doc: asciidoctor: remove unnecessary requireFelipe Contreras, Jun 8, 2021
  6. 07/12 doc: asciidoctor: reorganize extensionsFelipe Contreras, Jun 8, 2021
  7. 03/12 doc: simplify version passingFelipe Contreras, Jun 8, 2021
  8. 06/12 doc: asciidoctor: remove cruftFelipe Contreras, Jun 8, 2021
  9. 09/12 doc: asciidoctor: refactor macro registrationFelipe Contreras, Jun 8, 2021
  10. 12/12 doc: asciidoctor: specify name of our groupFelipe Contreras, Jun 8, 2021
  11. 08/12 doc: asciidoctor: use html-prefix only for htmlFelipe Contreras, Jun 8, 2021
  12. 11/12 doc: asciidoctor: split the format from the codeFelipe Contreras, Jun 8, 2021
  13. 10/12 doc: asciidoctor: improve string handlingFelipe Contreras, Jun 8, 2021

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.