[gxml] GomElement: More flexibility in namespaces declaration
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] GomElement: More flexibility in namespaces declaration
- Date: Sat, 8 Apr 2017 14:57:40 +0000 (UTC)
commit c5edd60abe3f7e2939006ac0e366466a6eec76de
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]