Exiting from xsltproc with an error

Does anyone out there know why xsltproc and the DocBooc stylesheets are so stuuuupid? When there’s a processing error, they just keep going. OK, fine, maybe useful. But then there’s no return value to say that there was a problem. The man page for xsltproc says it has return values, but it always returns 0 for me. And I’ve found the place in the DocBook stylesheets where the error is emitted. It looks like this:

      <xsl:message>
        <xsl:text>XRef to nonexistent id: </xsl:text>
        <xsl:value-of select="@linkend"/>
      </xsl:message>

The xsl:message tag supports an attribute of “terminate = yes”. So that should do it, but it doesn’t. When I add it, xsltproc terminates, but still returns result code 0.

How can it be that NO ONE has ever tried to put xsltproc into a makefile, and wanted make to correctly stop when there’s a problem with the input? What is WRONG with these DocBook bozos?

Arrrrgh.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *