]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure the xlink namespace occurs on the root and only on the root
authorNorman Walsh <ndw@nwalsh.com>
Sun, 17 Oct 2004 21:44:07 +0000 (21:44 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 17 Oct 2004 21:44:07 +0000 (21:44 +0000)
docbook/relaxng/tools/cleanup.pl

index 79cb8ccbae91f3fce49c4f17656d37d99f476dbe..7c49228354451e06d98e7f4079a7307ffd000947 100644 (file)
@@ -18,6 +18,11 @@ while (<>) {
     s/\s+xmlns:s=([\"\']).*?\1\s+/ /g;
     s/\s*xmlns:s=([\"\']).*?\1\s*//g;
 
+    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: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;