Commit 9506e7da authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent 1b9b791c
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment