]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
doc: configure docbook stylesheet to generate reproducible IDs 573/head
authorJohan Ouwerkerk <jm.ouwerkerk@gmail.com>
Mon, 13 Jul 2015 08:39:09 +0000 (10:39 +0200)
committerJohan Ouwerkerk <jm.ouwerkerk@gmail.com>
Mon, 13 Jul 2015 14:30:30 +0000 (16:30 +0200)
This makes auto generated anchor tags in HTML output reproducible.

man/custom-html.xsl

index f51fda77e6b5201ada7930c237ebfeacc8a6e0ff..151276362cc6b25dd95e0b631e49283cc93a2994 100644 (file)
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+<!--
+  - The docbook stylesheet injects empty anchor tags into generated HTML, identified by an auto-generated ID.
+  - Ask the docbook stylesheet to generate reproducible output when generating (these) ID values.
+  - This makes the output of this stylesheet reproducible across identical invocations on the same input,
+  - which is an easy and significant win for achieving reproducible builds.
+  -
+  - It may be even better to strip the empty anchors from the document output in addition to turning on consistent IDs,
+  - for this stylesheet contains its own custom ID logic (for generating permalinks) already.
+ -->
+<xsl:param name="generate.consistent.ids" select="1"/>
 
 <!-- translate man page references to links to html pages -->
 <xsl:template match="citerefentry[not(@project)]">