From: Daniel Lehman dlehman25@gmail.com
--- dlls/msxml3/attribute.c | 13 +++++-------- dlls/msxml3/tests/domdoc.c | 4 ---- 2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c index 89a1f630021..6b8c7fba6d9 100644 --- a/dlls/msxml3/attribute.c +++ b/dlls/msxml3/attribute.c @@ -589,14 +589,11 @@ static HRESULT WINAPI domattr_get_prefix(
*prefix = NULL;
- if (ns) - { - /* special case for default namespace definition */ - if (xmlStrEqual(This->node.node->name, xmlns)) - *prefix = bstr_from_xmlChar(xmlns); - else if (ns->prefix) - *prefix = bstr_from_xmlChar(ns->prefix); - } + if (xmlStrEqual(This->node.node->name, xmlns) && + xmldoc_version(This->node.node->doc) != MSXML6) + *prefix = bstr_from_xmlChar(xmlns); + else if (ns && ns->prefix) + *prefix = bstr_from_xmlChar(ns->prefix);
TRACE("prefix: %s\n", debugstr_w(*prefix));
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 526941b0620..29bcf7abd45 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -13401,10 +13401,8 @@ static void test_create_attribute(void) } else { - todo_wine_if(ptr->todo) { ok(hr == S_FALSE, "%d: unexpected hr %#lx\n", i, hr); ok(str == NULL, "%d: got prefix %s\n", i, wine_dbgstr_w(str)); - } } SysFreeString(str);
@@ -13861,12 +13859,10 @@ static void test_namespaces_as_attributes(void) if (test->prefixes[i]) { /* MSXML4 can report different results with different service packs */ - todo_wine_if(test->todo) { ok(hr == S_OK || broken(entry->ver == MSXML4 && hr == S_FALSE), "Failed to get prefix, hr %#lx.\n", hr); ok(!lstrcmpW(str, _bstr_(test->prefixes[i])) || broken(!str && entry->ver == MSXML4), "got %s\n", wine_dbgstr_w(str)); - } SysFreeString(str); } else