diff options
author | George Schlossnagle <gschlossnagle@php.net> | 2005-04-03 15:39:56 +0000 |
---|---|---|
committer | George Schlossnagle <gschlossnagle@php.net> | 2005-04-03 15:39:56 +0000 |
commit | 55c25c7275d659488479845b1f358f026c596782 (patch) | |
tree | b1eca41175a460da456f7707dc97062b60d8424c /ext/soap/php_encoding.c | |
parent | 1c4eb9b684c5bb2d13876f82896f88d119a00005 (diff) | |
download | php-git-55c25c7275d659488479845b1f358f026c596782.tar.gz |
Fix qualified names for attributes according to attributeFormDefault.
Add SOAP Interop tests from Dmitry.
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r-- | ext/soap/php_encoding.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index e9efb553cd..8e731679f4 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -1479,11 +1479,11 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo if ((*attr)->fixed && strcmp((*attr)->fixed,dummy->children->content) != 0) { soap_error3(E_ERROR, "Encoding: Attribute '%s' has fixed value '%s' (value '%s' is not allowed)", (*attr)->name, (*attr)->fixed, dummy->children->content); } - if ((*attr)->namens) { -/* - if ((*attr)->namens && - (type->ns == NULL || strcmp((*attr)->namens, type->ns))) { -*/ + /* we need to handle xml: namespace specially, since it is + an implicit schema. Otherwise, use form. + */ + if (!strncmp((*attr)->namens, XML_NAMESPACE, sizeof(XML_NAMESPACE)) || + (*attr)->form == XSD_FORM_QUALIFIED && (*attr)->namens) { xmlNsPtr nsp = encode_add_ns(xmlParam, (*attr)->namens); xmlSetNsProp(xmlParam, nsp, (*attr)->name, dummy->children->content); |