]> granicus.if.org Git - docbook-dsssl/commitdiff
Cleanup the dtd namespace
authorNorman Walsh <ndw@nwalsh.com>
Thu, 11 Nov 2004 17:45:06 +0000 (17:45 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 11 Nov 2004 17:45:06 +0000 (17:45 +0000)
docbook/relaxng/tools/cleanup.pl

index 7c49228354451e06d98e7f4079a7307ffd000947..18131e04264eecf7fca6391695efde9123ad97cf 100644 (file)
@@ -21,7 +21,10 @@ while (<>) {
     s/\s+xmlns:xlink=([\"\']).*?\1\s+/ /g;
     s/\s*xmlns:xlink=([\"\']).*?\1\s*//g;
 
-    s/<grammar /<grammar xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" /g;
+    s/\s+xmlns:dtd=([\"\']).*?\1\s+/ /g;
+    s/\s*xmlns:dtd=([\"\']).*?\1\s*//g;
+
+    s/<grammar /<grammar xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" xmlns:dtd=\"http:\/\/relaxng.org\/ns\/compatibility\/annotations\/1.0\" /g;
 
     s/<(s:rule\s+.*?)>/<\1 xmlns:s=\"http:\/\/www.ascc.net\/xml\/schematron\">/g;
     s/<(ctrl:\S+\s+.*?)(\/?>)/<\1 xmlns:ctrl=\"http:\/\/nwalsh.com\/xmlns\/schema-control\/\"\2/g;