From c5edd60abe3f7e2939006ac0e366466a6eec76de Mon Sep 17 00:00:00 2001 From: Daniel Espinosa Date: Sat, 8 Apr 2017 09:56:19 -0500 Subject: [PATCH] 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 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gxml/GomElement.vala b/gxml/GomElement.vala index e365f76a..82b3b814 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/" -- GitLab