}
xml_name = xmlchar_from_wchar(name);
- /* prevent empty href to be allocated */
+ /* prevent empty href from being allocated */
href = namespaceURI ? xmlchar_from_wchar(namespaceURI) : NULL;
switch(node_type)
xmlnode = xmlNewDocNode(get_doc(This), NULL, local ? local : xml_name, NULL);
- /* allow to create default namespace xmlns= */
+ /* allow creating the default namespace xmlns= */
if (local || (href && *href))
{
xmlNsPtr ns = xmlNewNs(xmlnode, href, prefix);
domelem *This = impl_from_IXMLDOMElement( iface );
xmlNodePtr element;
xmlChar *xml_name, *xml_value = NULL;
+ xmlChar *local, *prefix;
HRESULT hr = S_FALSE;
+ xmlNsPtr ns;
TRACE("(%p)->(%s %p)\n", This, debugstr_w(name), value);
if(!xmlValidateNameValue(xml_name))
hr = E_FAIL;
else
- xml_value = xmlGetNsProp(element, xml_name, NULL);
+ {
+ if ((local = xmlSplitQName2(xml_name, &prefix)))
+ {
+ if (xmlStrEqual(prefix, BAD_CAST "xmlns"))
+ {
+ ns = xmlSearchNs(element->doc, element, local);
+ if (ns)
+ xml_value = xmlStrdup(ns->href);
+ }
+ else
+ {
+ ns = xmlSearchNs(element->doc, element, prefix);
+ if (ns)
+ xml_value = xmlGetNsProp(element, local, ns->href);
+ }
+
+ xmlFree(prefix);
+ xmlFree(local);
+ }
+ else
+ xml_value = xmlGetNsProp(element, xml_name, NULL);
+ }
heap_free(xml_name);
if(xml_value)
refcount = xmlnode_get_inst_cnt(node_obj);
if (refcount) xmldoc_add_refs(before_node_obj->node->doc, refcount);
- xmlAddPrevSibling(before_node_obj->node, node_obj->node);
+ node_obj->node = xmlAddPrevSibling(before_node_obj->node, node_obj->node);
if (refcount) xmldoc_release_refs(doc, refcount);
node_obj->parent = This->parent;
}
if (refcount) xmldoc_add_refs(This->node->doc, refcount);
/* xmlAddChild doesn't unlink node from previous parent */
xmlUnlinkNode(node_obj->node);
- xmlAddChild(This->node, node_obj->node);
+ node_obj->node = xmlAddChild(This->node, node_obj->node);
if (refcount) xmldoc_release_refs(doc, refcount);
node_obj->parent = This->iface;
}
HRESULT node_get_owner_doc(const xmlnode *This, IXMLDOMDocument **doc)
{
+ if(!doc)
+ return E_INVALIDARG;
return get_domdoc_from_xmldoc(This->node->doc, (IXMLDOMDocument3**)doc);
}
static void update_position(saxlocator *This, BOOL fix_column)
{
const xmlChar *p = This->pParserCtxt->input->cur-1;
+ const xmlChar *baseP = This->pParserCtxt->input->base;
This->line = xmlSAX2GetLineNumber(This->pParserCtxt);
if(fix_column)
{
This->column = 1;
- for(; *p!='\n' && *p!='\r' && p>=This->pParserCtxt->input->base; p--)
+ for(;p>=baseP && *p!='\n' && *p!='\r'; p--)
This->column++;
}
else
]
library XMLPSR
{
-importlib("stdole32.tlb");
+/* importlib("stdole32.tlb"); */
importlib("stdole2.tlb");
[
reactos/dll/win32/msvidc32 # Synced to WineStaging-1.7.55
reactos/dll/win32/msxml # Synced to WineStaging-1.7.47
reactos/dll/win32/msxml2 # Synced to WineStaging-1.7.47
-reactos/dll/win32/msxml3 # Synced to WineStaging-1.7.47
+reactos/dll/win32/msxml3 # Synced to WineStaging-1.7.55
reactos/dll/win32/msxml4 # Synced to WineStaging-1.7.47
reactos/dll/win32/msxml6 # Synced to WineStaging-1.7.47
reactos/dll/win32/nddeapi # Synced to WineStaging-1.7.47