Should error/warn, if no refentry element is found
Status: Beta
Brought to you by:
stevecheng
According to http://bugs.debian.org/439214, docbook2x should give a warning or even stop, if there is no refentry element.
As reference: docbook-xsl gives an error.
Logged In: YES
user_id=1102637
Originator: YES
The fix is pretty easy in xslt/man/docbook.xsl in the template matching root. The template currently checks for child::refentry and calls xsl:apply-templates if the child is a refentry. However I do not fully understand, why you try to apply descendant-or-self::refentry separated and why you put it into a manpageset tag. I would suggest a simple:
[..]
<xsl:when test="//*[local-name() = 'refentry']">
<xsl:apply-templates select="//refentry"/>
</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>
[..]
This should work. Please adjust the terminate attribute value to determine, if it should fail or not.