xmllite: Return local name stored in namespace for prefixed namespace attribute values.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-03-31 15:58:29 +02:00 committed by Alexandre Julliard
parent 1b9b791c41
commit 9506e7da5e
2 changed files with 8 additions and 2 deletions

View File

@ -3225,6 +3225,12 @@ static HRESULT WINAPI xmlreader_GetLocalName(IXmlReader* iface, LPCWSTR *name, U
*name = xmlnsW;
*len = 5;
}
else if (This->attr->flags & ATTRIBUTE_NS_DEFINITION)
{
const struct ns *ns = reader_lookup_ns(This, &This->attr->localname);
*name = ns->prefix.str;
*len = ns->prefix.len;
}
else
{
*name = This->attr->localname.str;

View File

@ -2550,13 +2550,13 @@ static void test_string_pointers(void)
ok(xmlns_ns == reader_namespace(reader, "http://www.w3.org/2000/xmlns/"), "xmlns_ns != namespace\n");
read_node(reader, XmlNodeType_Element);
ptr = reader_prefix(reader, "p"); todo_wine ok(p == ptr, "p != prefix\n");
ok(p == reader_prefix(reader, "p"), "p != prefix\n");
ok(ns == reader_namespace(reader, "myns"), "empty != namespace\n");
name = reader_qname(reader, "p:elem2");
next_attribute(reader);
ok(empty != reader_value(reader, ""), "empty == value\n");
ptr = reader_prefix(reader, "q"); todo_wine ok(q == ptr, "q != prefix\n");
ok(q == reader_prefix(reader, "q"), "q != prefix\n");
ok(nsq == reader_namespace(reader, "mynsq"), "nsq != namespace\n");
read_node(reader, XmlNodeType_EndElement);