summaryrefslogtreecommitdiff
path: root/ext/soap/php_schema.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2004-08-26 18:40:10 +0000
committerDmitry Stogov <dmitry@php.net>2004-08-26 18:40:10 +0000
commitdedab09c329e2f8eeb14f1c2538a058098d6c20a (patch)
tree808ba40bb9a485338c520c8333274467c80715a6 /ext/soap/php_schema.c
parent0835c34572d3ae71227b55d00fa86f911dddf739 (diff)
downloadphp-git-dedab09c329e2f8eeb14f1c2538a058098d6c20a.tar.gz
Fixed bug #29839 (incorrect convert (xml:lang to lang))
Diffstat (limited to 'ext/soap/php_schema.c')
-rw-r--r--ext/soap/php_schema.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index a1d7ed8514..0fa5c4a08e 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -1729,6 +1729,7 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
if (nsptr != NULL) {
smart_str_appends(&key, nsptr->href);
smart_str_appendc(&key, ':');
+ newAttr->namens = estrdup(nsptr->href);
}
smart_str_appends(&key, attr_name);
smart_str_0(&key);
@@ -1745,6 +1746,7 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
if (ns != NULL) {
smart_str_appends(&key, ns->children->content);
smart_str_appendc(&key, ':');
+ newAttr->namens = estrdup(ns->children->content);
}
smart_str_appends(&key, name->children->content);
smart_str_0(&key);
@@ -2014,6 +2016,9 @@ static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr)
if ((*tmp)->name != NULL && attr->name == NULL) {
attr->name = estrdup((*tmp)->name);
}
+ if ((*tmp)->namens != NULL && attr->namens == NULL) {
+ attr->namens = estrdup((*tmp)->namens);
+ }
if ((*tmp)->def != NULL && attr->def == NULL) {
attr->def = estrdup((*tmp)->def);
}
@@ -2071,6 +2076,7 @@ static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashT
memcpy(newAttr, *tmp_attr, sizeof(sdlAttribute));
if (newAttr->def) {newAttr->def = estrdup(newAttr->def);}
if (newAttr->fixed) {newAttr->fixed = estrdup(newAttr->fixed);}
+ if (newAttr->namens) {newAttr->namens = estrdup(newAttr->namens);}
if (newAttr->name) {newAttr->name = estrdup(newAttr->name);}
if (newAttr->extraAttributes) {
xmlNodePtr node;
@@ -2330,6 +2336,9 @@ void delete_attribute(void *attribute)
if (attr->name) {
efree(attr->name);
}
+ if (attr->namens) {
+ efree(attr->namens);
+ }
if (attr->ref) {
efree(attr->ref);
}