From 71fc75e0f150e41c4f2d34f7390771c1df78cbc5 Mon Sep 17 00:00:00 2001 From: Stefan Knorr Date: Wed, 11 Nov 2015 15:25:06 +0100 Subject: [PATCH] Fix bug#1371: namespace insertion fails in some cases When you have the script would fail to do its job because immediately after the final quote, ", the tag was closed with >. Of course, that is completely valid XML, so it should not trip up the script. --- releasetools/xslns-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releasetools/xslns-build b/releasetools/xslns-build index 45ebfa6c2..3cd7d1cf3 100755 --- a/releasetools/xslns-build +++ b/releasetools/xslns-build @@ -247,7 +247,7 @@ sub nsfilter { # Add the docbook5 namespace declaration to root element - s|(xmlns:xsl\s*=\s*"http://www.w3.org/1999/XSL/Transform"(?!>))(\s*\n?)(\s*)|$1$2$3xmlns:d="http://docbook.org/ns/docbook"\n$3|s; + s|([ \t]*)(xmlns:xsl\s*=\s*"http://www.w3.org/1999/XSL/Transform")|$1$2\n$1xmlns:d="http://docbook.org/ns/docbook"|s; # Add namespace d to exclude-result-prefixes -- 2.40.0