mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 23:00:36 +00:00
msxml3: Return URL from get_namespaceURI from attributes for MSXML6.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f95a111608
commit
c1d21f1ae4
|
@ -549,6 +549,8 @@ static HRESULT WINAPI domattr_get_namespaceURI(
|
|||
IXMLDOMAttribute *iface,
|
||||
BSTR* p)
|
||||
{
|
||||
static const WCHAR w3xmlns[] = { 'h','t','t','p',':','/','/', 'w','w','w','.','w','3','.',
|
||||
'o','r','g','/','2','0','0','0','/','x','m','l','n','s','/',0 };
|
||||
domattr *This = impl_from_IXMLDOMAttribute( iface );
|
||||
xmlNsPtr ns = This->node.node->ns;
|
||||
|
||||
|
@ -565,7 +567,12 @@ static HRESULT WINAPI domattr_get_namespaceURI(
|
|||
if (xmlStrEqual(This->node.node->name, xmlns))
|
||||
*p = bstr_from_xmlChar(xmlns);
|
||||
else if (xmlStrEqual(ns->prefix, xmlns))
|
||||
*p = SysAllocStringLen(NULL, 0);
|
||||
{
|
||||
if (xmldoc_version(This->node.node->doc) == MSXML6)
|
||||
*p = SysAllocString(w3xmlns);
|
||||
else
|
||||
*p = SysAllocStringLen(NULL, 0);
|
||||
}
|
||||
else if (ns->href)
|
||||
*p = bstr_from_xmlChar(ns->href);
|
||||
}
|
||||
|
|
|
@ -396,6 +396,11 @@ xmlNodePtr xmldoc_unlink_xmldecl(xmlDocPtr doc)
|
|||
return node;
|
||||
}
|
||||
|
||||
MSXML_VERSION xmldoc_version(xmlDocPtr doc)
|
||||
{
|
||||
return properties_from_xmlDocPtr(doc)->version;
|
||||
}
|
||||
|
||||
BOOL is_preserving_whitespace(xmlNodePtr node)
|
||||
{
|
||||
domdoc_properties* properties = NULL;
|
||||
|
|
|
@ -284,6 +284,7 @@ extern HRESULT xmldoc_add_orphan( xmlDocPtr doc, xmlNodePtr node ) DECLSPEC_HIDD
|
|||
extern HRESULT xmldoc_remove_orphan( xmlDocPtr doc, xmlNodePtr node ) DECLSPEC_HIDDEN;
|
||||
extern void xmldoc_link_xmldecl(xmlDocPtr doc, xmlNodePtr node) DECLSPEC_HIDDEN;
|
||||
extern xmlNodePtr xmldoc_unlink_xmldecl(xmlDocPtr doc) DECLSPEC_HIDDEN;
|
||||
extern MSXML_VERSION xmldoc_version( xmlDocPtr doc ) DECLSPEC_HIDDEN;
|
||||
|
||||
extern HRESULT XMLElement_create( xmlNodePtr node, LPVOID *ppObj, BOOL own ) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -12834,16 +12834,15 @@ typedef struct _namespace_as_attribute_t {
|
|||
const GUID *guid;
|
||||
const char *clsid;
|
||||
const char *xmlns_uri;
|
||||
BOOL todo;
|
||||
} namespace_as_attribute_t;
|
||||
|
||||
static const namespace_as_attribute_t namespace_as_attribute_test_data[] = {
|
||||
{ &CLSID_DOMDocument, "CLSID_DOMDocument", "", FALSE },
|
||||
{ &CLSID_DOMDocument2, "CLSID_DOMDocument2", "", FALSE },
|
||||
{ &CLSID_DOMDocument26, "CLSID_DOMDocument26", "", FALSE },
|
||||
{ &CLSID_DOMDocument30, "CLSID_DOMDocument30", "", FALSE },
|
||||
{ &CLSID_DOMDocument40, "CLSID_DOMDocument40", "", FALSE },
|
||||
{ &CLSID_DOMDocument60, "CLSID_DOMDocument60", "http://www.w3.org/2000/xmlns/", TRUE },
|
||||
{ &CLSID_DOMDocument, "CLSID_DOMDocument", "" },
|
||||
{ &CLSID_DOMDocument2, "CLSID_DOMDocument2", "" },
|
||||
{ &CLSID_DOMDocument26, "CLSID_DOMDocument26", "" },
|
||||
{ &CLSID_DOMDocument30, "CLSID_DOMDocument30", "" },
|
||||
{ &CLSID_DOMDocument40, "CLSID_DOMDocument40", "" },
|
||||
{ &CLSID_DOMDocument60, "CLSID_DOMDocument60", "http://www.w3.org/2000/xmlns/" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
@ -12970,7 +12969,6 @@ static void test_namespaces_as_attributes(void)
|
|||
{
|
||||
ok(hr == S_OK, "Failed to get node name, hr %#x.\n", hr);
|
||||
if (test->prefixes[i] && !strcmp(test->prefixes[i], "xmlns"))
|
||||
todo_wine_if(entry->todo)
|
||||
ok(!lstrcmpW(str, _bstr_(entry->xmlns_uri)), "got %s\n", wine_dbgstr_w(str));
|
||||
else
|
||||
ok(!lstrcmpW(str, _bstr_(test->uris[i])), "got %s\n", wine_dbgstr_w(str));
|
||||
|
|
Loading…
Reference in a new issue