diff options
| author | Christian Stocker <chregu@php.net> | 2004-02-23 15:54:45 +0000 |
|---|---|---|
| committer | Christian Stocker <chregu@php.net> | 2004-02-23 15:54:45 +0000 |
| commit | 0c7143efe97a95a6dfc9ca9e6c963c2d9c81f6f2 (patch) | |
| tree | cb6b8593ba21203238ccab3345c579bf71646402 /ext/xml/compat.c | |
| parent | 0c942d06e6fc9f39021f56f0d26ea1f04f39c0c4 (diff) | |
| download | php-git-0c7143efe97a95a6dfc9ca9e6c963c2d9c81f6f2.tar.gz | |
- mixed up name and value... fixed
Diffstat (limited to 'ext/xml/compat.c')
| -rw-r--r-- | ext/xml/compat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/xml/compat.c b/ext/xml/compat.c index 5c3f903835..4c8cb01f05 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -86,18 +86,18 @@ _start_element_handler_ns(void *user, const xmlChar *name, const xmlChar *prefix xmlChar *qualified_name_attr = NULL; for (i = 0; i < nb_attributes; i += 1) { - attrs[z] = xmlStrdup( attributes[y]); - + if (attributes[y+1] != NULL) { - _qualify_namespace(parser, xmlStrndup(attributes[y + 3] , (int) (attributes[y + 4] - attributes[y + 3])), attributes[2], &qualified_name_attr); + _qualify_namespace(parser, attributes[y] , attributes[2], &qualified_name_attr); } else { - qualified_name_attr = xmlStrndup(attributes[y + 3] , (int) (attributes[y + 4] - attributes[y + 3])); + qualified_name_attr = xmlStrdup(attributes[y]); } - attrs[z + 1] = qualified_name_attr; + attrs[z] = qualified_name_attr; + attrs[z + 1] = xmlStrndup(attributes[y + 3] , (int) (attributes[y + 4] - attributes[y + 3])); z += 2; y += 5; } - + attrs[z] = NULL; } parser->h_start_element(parser->user, (const XML_Char *) qualified_name, (const XML_Char **) attrs); |
