blob: a9d598874f9c9b317d87c4f7d7ba51f94202fe77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 05_fix_439214_error_on_missing_refentry.dpatch by Daniel Leidert <daniel.leidert@wgdd.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: If there is no refentry element, the manpage stylesheets silently
## DP: "ignores" this. It has been requested to print at least a
## DP: warning.
## DP:
## DP: <URL:http://bugs.debian.org/439214>
## DP: <URL:http://lists.gnu.org/archive/html/groff/2007-11/msg00023.html>
@DPATCH@
--- a/xslt/man/docbook.xsl
+++ b/xslt/man/docbook.xsl
@@ -111,11 +111,15 @@
<xsl:when test="child::refentry">
<xsl:apply-templates />
</xsl:when>
-
- <xsl:otherwise>
+ <xsl:when test="descendant-or-self::refentry">
<manpageset>
<xsl:apply-templates select="descendant-or-self::refentry" />
</manpageset>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="no">
+ <xsl:text>WARNING: Sorry, but I cannot find a refentry element in your source!</xsl:text>
+ </xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
|