]> granicus.if.org Git - docbook-dsssl/commitdiff
fix issue #33 Timestamps in manpages considered bugs
authorbobstayton <bobs@sagehill.net>
Thu, 12 Jul 2018 07:38:38 +0000 (00:38 -0700)
committerbobstayton <bobs@sagehill.net>
Thu, 12 Jul 2018 07:58:23 +0000 (00:58 -0700)
xsl/manpages/other.xsl
xsl/manpages/param.ent
xsl/manpages/param.xweb
xsl/params/man.show.top.comment.date.xml [new file with mode: 0644]

index 435b578d65c97281570102c378e557eaa2a10289..c87b08c1751aecae3ca8243cd87aec8dc1422235 100644 (file)
     </xsl:call-template>
     <xsl:text> &lt;http://docbook.sf.net/></xsl:text>
     <xsl:text>&#10;</xsl:text>
-    <xsl:text>.\"      Date: </xsl:text>
-    <xsl:call-template name="replace.dots.and.dashes">
-      <xsl:with-param name="content" select="$date"/>
-    </xsl:call-template>
-    <xsl:text>&#10;</xsl:text>
+    <!-- option to turn off date to avoid triggering version in
+         archive systems -->
+    <xsl:if test="$man.show.top.comment.date != 0">
+      <xsl:text>.\"      Date: </xsl:text>
+      <xsl:call-template name="replace.dots.and.dashes">
+        <xsl:with-param name="content" select="$date"/>
+      </xsl:call-template>
+      <xsl:text>&#10;</xsl:text>
+    </xsl:if>
     <xsl:text>.\"    Manual: </xsl:text>
     <xsl:call-template name="replace.dots.and.dashes">
       <xsl:with-param name="content" select="$manual"/>
index 4c61466123a0c2d3224746af87c528b9eb9eaafe..6668aa46a08e436a7f28d9406c98732a1d85d17b 100644 (file)
@@ -41,6 +41,7 @@
 <!ENTITY man.string.subst.map SYSTEM "../params/man.string.subst.map.xml">
 <!ENTITY man.subheading.divider.enabled SYSTEM "../params/man.subheading.divider.enabled.xml">
 <!ENTITY man.subheading.divider SYSTEM "../params/man.subheading.divider.xml">
+<!ENTITY man.show.top.comment.date SYSTEM "../params/man.show.top.comment.date.xml">
 <!ENTITY man.table.footnotes.divider SYSTEM "../params/man.table.footnotes.divider.xml">
 <!ENTITY man.th.extra1.suppress SYSTEM "../params/man.th.extra1.suppress.xml">
 <!ENTITY man.th.extra2.max.length SYSTEM "../params/man.th.extra2.max.length.xml">
index e335435fc7e41eaf4ef0e915ea11a33cac4a53c6..7dd7eb835731473b3e00ada452e36269c8b8e0b8 100644 (file)
 &man.table.footnotes.divider;
 &man.subheading.divider.enabled;
 &man.subheading.divider;
+&man.show.top.comment.date;
   </reference>
   <appendix xml:id="stylesheet">
     <title>The Stylesheet</title>
 <src:fragref linkend="man.string.subst.map.local.pre.frag"/>
 <src:fragref linkend="man.subheading.divider.enabled.frag"/>
 <src:fragref linkend="man.subheading.divider.frag"/>
+<src:fragref linkend="man.show.top.comment.date.frag"/>
 <src:fragref linkend="man.table.footnotes.divider.frag"/>
 <src:fragref linkend="man.th.extra1.suppress.frag"/>
 <src:fragref linkend="man.th.extra2.max.length.frag"/>
diff --git a/xsl/params/man.show.top.comment.date.xml b/xsl/params/man.show.top.comment.date.xml
new file mode 100644 (file)
index 0000000..c66a939
--- /dev/null
@@ -0,0 +1,36 @@
+<refentry xmlns="http://docbook.org/ns/docbook"
+          xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:xi="http://www.w3.org/2001/XInclude"
+          xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+          version="5.0" xml:id="man.show.top.comment.date">
+<refmeta>
+<refentrytitle>man.show.top.comment.date</refentrytitle>
+<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>man.show.top.comment.date</refname>
+<refpurpose>Include metadata date in top comment section</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment xml:id="man.show.top.comment.date.frag">
+<xsl:param name="man.show.top.comment.date">1</xsl:param></src:fragment>
+</refsynopsisdiv>
+
+<refsection><info><title>Description</title></info>
+
+<para>If non-zero, the metadata date is included in the group of metadata
+comments at the top of the generated man page file.  That group includes
+Title, Author, etc.  If the value is zero, then that date comment
+is omitted.  The default value is 1.</para>
+
+<para>If the refentry page info does not include a date element,
+then the current date is used, that is, the date the man page was generated from 
+the refentry. In archiving systems, this can trigger a change of version that
+is not desired when no changes were actually made.  This parameter allows you to
+omit the top comment date in the generated man page.
+</para>
+
+</refsection>
+</refentry>