Fix bogus XLink namespace URL.
authorHenri Sivonen <hsivonen@iki.fi>
Tue, 24 May 2011 14:01:35 +0300
changeset 704 2098b522a9c48d70c91ee604c3ab129b5f233a30
parent 703 6e759c1b5b41302c6dedf450b9ba1d5b70b39769
child 705 ea9f12bca0eba71a90abb71390ec230923334c3c
push id77
push userhsivonen@iki.fi
push dateTue, 24 May 2011 11:02:38 +0000
Fix bogus XLink namespace URL.
src/nu/validator/htmlparser/impl/TreeBuilder.java
src/nu/validator/htmlparser/sax/XmlSerializer.java
--- a/src/nu/validator/htmlparser/impl/TreeBuilder.java
+++ b/src/nu/validator/htmlparser/impl/TreeBuilder.java
@@ -4805,20 +4805,20 @@ public abstract class TreeBuilder<T> imp
                     if (!"http://www.w3.org/1999/xlink".equals(xmlns)) {
                         err("Bad value \u201C"
                                 + xmlns
                                 + "\u201D for the attribute \u201Cxmlns:link\u201D (only \u201Chttp://www.w3.org/1999/xlink\u201D permitted here).");
                         switch (namePolicy) {
                             case ALTER_INFOSET:
                                 // fall through
                             case ALLOW:
-                                warn("Attribute \u201Cxmlns:xlink\u201D with the value \u201Chttp://www.w3org/1999/xlink\u201D is not serializable as XML 1.0 without changing document semantics.");
+                                warn("Attribute \u201Cxmlns:xlink\u201D with a value other than \u201Chttp://www.w3.org/1999/xlink\u201D is not serializable as XML 1.0 without changing document semantics.");
                                 break;
                             case FATAL:
-                                fatal("Attribute \u201Cxmlns:xlink\u201D with the value \u201Chttp://www.w3org/1999/xlink\u201D is not serializable as XML 1.0 without changing document semantics.");
+                                fatal("Attribute \u201Cxmlns:xlink\u201D with a value other than \u201Chttp://www.w3.org/1999/xlink\u201D is not serializable as XML 1.0 without changing document semantics.");
                                 break;
                         }
                     }
                 } else {
                     err("Attribute \u201C" + attributes.getXmlnsLocalName(i)
                             + "\u201D not allowed here.");
                     switch (namePolicy) {
                         case ALTER_INFOSET:
--- a/src/nu/validator/htmlparser/sax/XmlSerializer.java
+++ b/src/nu/validator/htmlparser/sax/XmlSerializer.java
@@ -150,17 +150,17 @@ public class XmlSerializer implements Co
         WELL_KNOWN_ATTRIBUTE_PREFIXES.put(
                 "http://www.justsystem.co.jp/hanako13/svg", "jsh");
         WELL_KNOWN_ATTRIBUTE_PREFIXES.put(
                 "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdf");
         WELL_KNOWN_ATTRIBUTE_PREFIXES.put("http://www.w3.org/1999/xlink",
                 "xlink");
         WELL_KNOWN_ATTRIBUTE_PREFIXES.put(
                 "http://www.w3.org/2001/XMLSchema-instance", "xsi");
-        WELL_KNOWN_ATTRIBUTE_PREFIXES.put("http://www.w3org/1999/xlink",
+        WELL_KNOWN_ATTRIBUTE_PREFIXES.put("http://www.w3.org/1999/xlink",
                 "xlink");
     }
 
     private final static Map<String, String> WELL_KNOWN_ELEMENT_PREFIXES = new HashMap<String, String>();
 
     static {
         WELL_KNOWN_ELEMENT_PREFIXES.put("http://www.w3.org/1999/XSL/Transform",
                 "xsl");