Looking at
https://github.com/docbook/xslt10-stylesheets/blob/master/releasetools/xslns-build#L252 ,
the (?!>) seems fishy to me.
Essentially, when you have <xsl:stylesheet xmlns:xsl="..."> the script would fail to do its job because immediately after the ", the tag was closed with >. Of course, that is completely valid XML, so it should not trip up the script
We rectified that line downstream by replacing it with this:
s|([ \t]*)(xmlns:xsl\s*=\s*"http://www.w3.org/1999/XSL/Transform")|$1$2\n$1xmlns:d="http://docbook.org/ns/docbook"|s;