xml UPDATE check for namespace errors

Refs #1259
diff --git a/tests/utests/basic/test_xml.c b/tests/utests/basic/test_xml.c
index 8bf6bed..c94e5ad 100644
--- a/tests/utests/basic/test_xml.c
+++ b/tests/utests/basic/test_xml.c
@@ -68,6 +68,20 @@
     CHECK_LOG_CTX("Unknown XML section \"<!NONSENSE/>\".", "Line number 1.");
     ly_in_free(in, 0);
 
+    /* namespace ambiguity */
+    str = "<element xmlns=\"urn1\" xmlns=\"urn2\"/>";
+    assert_int_equal(LY_SUCCESS, ly_in_new_memory(str, &in));
+    assert_int_equal(LY_EVALID, lyxml_ctx_new(UTEST_LYCTX, in, &xmlctx));
+    CHECK_LOG_CTX("Duplicate default XML namespaces \"urn1\" and \"urn2\".", "Line number 1.");
+    ly_in_free(in, 0);
+
+    /* prefix duplicate */
+    str = "<element xmlns:a=\"urn1\" xmlns:a=\"urn2\"/>";
+    assert_int_equal(LY_SUCCESS, ly_in_new_memory(str, &in));
+    assert_int_equal(LY_EVALID, lyxml_ctx_new(UTEST_LYCTX, in, &xmlctx));
+    CHECK_LOG_CTX("Duplicate XML NS prefix \"a\" used for namespaces \"urn1\" and \"urn2\".", "Line number 1.");
+    ly_in_free(in, 0);
+
     /* unqualified element */
     str = "  <  element/>";
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(str, &in));