Module: wine Branch: master Commit: 6d2f4471ed541abeb3c8377a74b7736c5517f494 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6d2f4471ed541abeb3c8377a74...
Author: Hans Leidekker hans@codeweavers.com Date: Tue Oct 17 11:37:27 2017 +0200
webservices: Fix handling of namespace attributes in WsWriteNode.
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/webservices/writer.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/webservices/writer.c b/dlls/webservices/writer.c index 1baac07..f6917c6 100644 --- a/dlls/webservices/writer.c +++ b/dlls/webservices/writer.c @@ -4472,9 +4472,20 @@ static HRESULT write_set_attributes( struct writer *writer, WS_XML_ATTRIBUTE **a
for (i = 0; i < count; i++) { - if ((hr = write_add_attribute( writer, attrs[i]->prefix, attrs[i]->localName, attrs[i]->ns, - attrs[i]->singleQuote )) != S_OK) return hr; - if ((hr = write_set_attribute_value( writer, attrs[i]->value )) != S_OK) return hr; + const WS_XML_STRING *prefix = attrs[i]->prefix; + const WS_XML_STRING *localname = attrs[i]->localName; + const WS_XML_STRING *ns = attrs[i]->ns; + BOOL single = attrs[i]->singleQuote; + + if (attrs[i]->isXmlNs) + { + if ((hr = add_namespace_attribute( writer, prefix, ns, single )) != S_OK) return hr; + } + else + { + if ((hr = write_add_attribute( writer, prefix, localname, ns, single )) != S_OK) return hr; + if ((hr = write_set_attribute_value( writer, attrs[i]->value )) != S_OK) return hr; + } } return S_OK; }