[gxml/gxml-0.14: 1/2] GomElement: More flexibility in namespaces declaration



commit c545a57a5fc1705838bf673f53bab75af2ce5ecf
Author: Daniel Espinosa <esodan gmail com>
Date:   Sat Apr 8 09:56:19 2017 -0500

    GomElement: More flexibility in namespaces declaration
    
    Accepted URI for namespace declarations:
    
    http://www.w3.org/2000/xmlns/
    
    or
    
    http://www.w3.org/2000/xmlns

 gxml/GomElement.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gxml/GomElement.vala b/gxml/GomElement.vala
index e365f76..82b3b81 100644
--- a/gxml/GomElement.vala
+++ b/gxml/GomElement.vala
@@ -537,7 +537,8 @@ public class GXml.GomElement : GomNode,
        throw new DomError.NAMESPACE_ERROR (_("Invalid namespace. If prefix is null, namespace URI should not 
be null"));
     if (p == "xml" && namespace_uri != "http://www.w3.org/2000/xmlns/";)
        throw new DomError.NAMESPACE_ERROR (_("Invalid namespace. If prefix is xml, namespace URI should be 
http://www.w3.org/2000/xmlns/";));
-    if (p == "xmlns" && namespace_uri != "http://www.w3.org/2000/xmlns/";)
+    if (p == "xmlns" && (namespace_uri != "http://www.w3.org/2000/xmlns/";
+            && namespace_uri != "http://www.w3.org/2000/xmlns";))
        throw new DomError.NAMESPACE_ERROR (_("Invalid namespace. If attribute's prefix is xmlns, namespace 
URI should be http://www.w3.org/2000/xmlns/";));
     if (p == "" && n == "xmlns"
         && (namespace_uri != "http://www.w3.org/2000/xmlns/";


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]