Module: wine Branch: master Commit: 44d850c259b7a36007beaf38941a157b31b7c2db URL: http://source.winehq.org/git/wine.git/?a=commit;h=44d850c259b7a36007beaf3894...
Author: Hans Leidekker hans@codeweavers.com Date: Thu Jan 21 15:27:55 2016 +0100
webservices: Attributes inherit the prefix from their element.
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/webservices/writer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/webservices/writer.c b/dlls/webservices/writer.c index ece5ad1..d36793a 100644 --- a/dlls/webservices/writer.c +++ b/dlls/webservices/writer.c @@ -454,20 +454,24 @@ static HRESULT write_attribute( struct writer *writer, WS_XML_ATTRIBUTE *attr ) { WS_XML_UTF8_TEXT *text = (WS_XML_UTF8_TEXT *)attr->value; unsigned char quote = attr->singleQuote ? ''' : '"'; + const WS_XML_STRING *prefix; ULONG size; HRESULT hr;
+ if (attr->prefix) prefix = attr->prefix; + else prefix = writer->current->hdr.prefix; + /* ' prefix:attr="value"' */
size = attr->localName->length + 4 /* ' =""' */; - if (attr->prefix) size += attr->prefix->length + 1 /* ':' */; + if (prefix) size += prefix->length + 1 /* ':' */; if (text) size += text->value.length; if ((hr = write_grow_buffer( writer, size )) != S_OK) return hr;
write_char( writer, ' ' ); - if (attr->prefix) + if (prefix) { - write_bytes( writer, attr->prefix->bytes, attr->prefix->length ); + write_bytes( writer, prefix->bytes, prefix->length ); write_char( writer, ':' ); } write_bytes( writer, attr->localName->bytes, attr->localName->length );