From: Dmitry Stogov Date: Mon, 28 Mar 2005 18:06:29 +0000 (+0000) Subject: Fixed handling of attributes' namespaces X-Git-Tag: php-5.0.1b1~661 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=caeeebebc1a2c7654a9efd35678be34ce7f9a51e;p=php Fixed handling of attributes' namespaces --- diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index cb17bebbc4..e9efb553cd 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -1479,8 +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) == 0)) { + (type->ns == NULL || strcmp((*attr)->namens, type->ns))) { +*/ xmlNsPtr nsp = encode_add_ns(xmlParam, (*attr)->namens); xmlSetNsProp(xmlParam, nsp, (*attr)->name, dummy->children->content); diff --git a/ext/soap/tests/schema/schema037.phpt b/ext/soap/tests/schema/schema037.phpt index 4e59981fc9..75e1757554 100644 --- a/ext/soap/tests/schema/schema037.phpt +++ b/ext/soap/tests/schema/schema037.phpt @@ -18,7 +18,7 @@ echo "ok"; ?> --EXPECTF-- -str +str object(stdClass)#%d (2) { ["str"]=> string(3) "str" diff --git a/ext/soap/tests/schema/schema038.phpt b/ext/soap/tests/schema/schema038.phpt index 2d37e89e0b..ed7e3b4fc5 100644 --- a/ext/soap/tests/schema/schema038.phpt +++ b/ext/soap/tests/schema/schema038.phpt @@ -19,7 +19,7 @@ echo "ok"; ?> --EXPECTF-- -str +str object(stdClass)#%d (2) { ["str"]=> string(3) "str" diff --git a/ext/soap/tests/schema/schema039.phpt b/ext/soap/tests/schema/schema039.phpt index 0b7ef5afc4..67b1c2544a 100644 --- a/ext/soap/tests/schema/schema039.phpt +++ b/ext/soap/tests/schema/schema039.phpt @@ -21,7 +21,7 @@ echo "ok"; ?> --EXPECTF-- -str +str object(stdClass)#%d (2) { ["str"]=> string(3) "str" diff --git a/ext/soap/tests/schema/schema040.phpt b/ext/soap/tests/schema/schema040.phpt index f7ddc04546..29815fe1f5 100644 --- a/ext/soap/tests/schema/schema040.phpt +++ b/ext/soap/tests/schema/schema040.phpt @@ -22,7 +22,7 @@ echo "ok"; ?> --EXPECTF-- -str +str object(stdClass)#%d (2) { ["str"]=> string(3) "str" diff --git a/ext/soap/tests/schema/schema042.phpt b/ext/soap/tests/schema/schema042.phpt index a8aa8857d9..35a9e8ea02 100644 --- a/ext/soap/tests/schema/schema042.phpt +++ b/ext/soap/tests/schema/schema042.phpt @@ -19,7 +19,7 @@ echo "ok"; ?> --EXPECTF-- -123 +123 object(stdClass)#%d (2) { ["_"]=> int(123) diff --git a/ext/soap/tests/schema/schema043.phpt b/ext/soap/tests/schema/schema043.phpt index 08c2996363..db48582647 100644 --- a/ext/soap/tests/schema/schema043.phpt +++ b/ext/soap/tests/schema/schema043.phpt @@ -26,7 +26,7 @@ echo "ok"; ?> --EXPECTF-- -123 +123 object(stdClass)#%d (3) { ["_"]=> int(123) diff --git a/ext/soap/tests/schema/schema044.phpt b/ext/soap/tests/schema/schema044.phpt index 8fc0705518..e2b9fda77a 100644 --- a/ext/soap/tests/schema/schema044.phpt +++ b/ext/soap/tests/schema/schema044.phpt @@ -19,7 +19,7 @@ echo "ok"; ?> --EXPECTF-- -123 +123 object(stdClass)#%d (2) { ["_"]=> int(123) diff --git a/ext/soap/tests/schema/schema045.phpt b/ext/soap/tests/schema/schema045.phpt index 346a929d85..5f7e649f5a 100644 --- a/ext/soap/tests/schema/schema045.phpt +++ b/ext/soap/tests/schema/schema045.phpt @@ -26,7 +26,7 @@ echo "ok"; ?> --EXPECTF-- -123 +123 object(stdClass)#%d (2) { ["_"]=> int(123) diff --git a/ext/soap/tests/schema/schema046.phpt b/ext/soap/tests/schema/schema046.phpt index 3f9d03afad..3452c20b4e 100644 --- a/ext/soap/tests/schema/schema046.phpt +++ b/ext/soap/tests/schema/schema046.phpt @@ -26,7 +26,7 @@ echo "ok"; ?> --EXPECTF-- -123 +123 object(stdClass)#%d (3) { ["_"]=> int(123) diff --git a/ext/soap/tests/schema/schema047.phpt b/ext/soap/tests/schema/schema047.phpt index 1265cfd3a3..f49946ff4a 100644 --- a/ext/soap/tests/schema/schema047.phpt +++ b/ext/soap/tests/schema/schema047.phpt @@ -24,7 +24,7 @@ echo "ok"; ?> --EXPECTF-- -123 +123 object(stdClass)#%d (2) { ["int"]=> int(123) diff --git a/ext/soap/tests/schema/schema048.phpt b/ext/soap/tests/schema/schema048.phpt index 98d4d4be44..4f0cb7e20f 100644 --- a/ext/soap/tests/schema/schema048.phpt +++ b/ext/soap/tests/schema/schema048.phpt @@ -26,7 +26,7 @@ echo "ok"; ?> --EXPECTF-- -123 +123 object(stdClass)#%d (2) { ["_"]=> int(123) diff --git a/ext/soap/tests/schema/schema062.phpt b/ext/soap/tests/schema/schema062.phpt index d4efc9a599..e9e295a6a3 100644 --- a/ext/soap/tests/schema/schema062.phpt +++ b/ext/soap/tests/schema/schema062.phpt @@ -19,7 +19,7 @@ echo "ok"; ?> --EXPECTF-- - + object(stdClass)#%d (2) { ["_"]=> NULL diff --git a/ext/soap/tests/schema/schema065.phpt b/ext/soap/tests/schema/schema065.phpt index e3f0d646dc..abc6cf9268 100644 --- a/ext/soap/tests/schema/schema065.phpt +++ b/ext/soap/tests/schema/schema065.phpt @@ -16,7 +16,7 @@ echo "ok"; ?> --EXPECTF-- - + object(stdClass)#%d (2) { ["str"]=> string(3) "str" diff --git a/ext/soap/tests/schema/schema066.phpt b/ext/soap/tests/schema/schema066.phpt index b281271963..3991708ee8 100644 --- a/ext/soap/tests/schema/schema066.phpt +++ b/ext/soap/tests/schema/schema066.phpt @@ -16,7 +16,7 @@ echo "ok"; ?> --EXPECTF-- - + object(stdClass)#%d (2) { ["str"]=> string(3) "str" diff --git a/ext/soap/tests/schema/schema067.phpt b/ext/soap/tests/schema/schema067.phpt index 0e4000957a..34cb89c332 100644 --- a/ext/soap/tests/schema/schema067.phpt +++ b/ext/soap/tests/schema/schema067.phpt @@ -16,7 +16,7 @@ echo "ok"; ?> --EXPECTF-- - + object(stdClass)#%d (2) { ["str"]=> string(3) "str" diff --git a/ext/soap/tests/schema/schema069.phpt b/ext/soap/tests/schema/schema069.phpt index e4f733a1c0..8f21e8670d 100644 --- a/ext/soap/tests/schema/schema069.phpt +++ b/ext/soap/tests/schema/schema069.phpt @@ -17,7 +17,7 @@ echo "ok"; ?> --EXPECTF-- - + object(stdClass)#%d (2) { ["str"]=> string(3) "str" diff --git a/ext/soap/tests/schema/schema070.phpt b/ext/soap/tests/schema/schema070.phpt index af9abdc10f..e471ca88ff 100644 --- a/ext/soap/tests/schema/schema070.phpt +++ b/ext/soap/tests/schema/schema070.phpt @@ -19,7 +19,7 @@ echo "ok"; ?> --EXPECTF-- - + object(stdClass)#%d (2) { ["str"]=> string(3) "str"