summaryrefslogtreecommitdiff
path: root/ext/soap/php_schema.c
diff options
context:
space:
mode:
authorGeorge Schlossnagle <gschlossnagle@php.net>2005-04-03 15:39:56 +0000
committerGeorge Schlossnagle <gschlossnagle@php.net>2005-04-03 15:39:56 +0000
commit55c25c7275d659488479845b1f358f026c596782 (patch)
treeb1eca41175a460da456f7707dc97062b60d8424c /ext/soap/php_schema.c
parent1c4eb9b684c5bb2d13876f82896f88d119a00005 (diff)
downloadphp-git-55c25c7275d659488479845b1f358f026c596782.tar.gz
Fix qualified names for attributes according to attributeFormDefault.
Add SOAP Interop tests from Dmitry.
Diffstat (limited to 'ext/soap/php_schema.c')
-rw-r--r--ext/soap/php_schema.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index 6aee0926c5..b0e537f348 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -1890,7 +1890,25 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
}
attr = attr->next;
}
-
+ if(newAttr->form == XSD_FORM_DEFAULT) {
+ xmlNodePtr parent = attrType->parent;
+ while(parent) {
+ if(node_is_equal_ex(parent, "schema", SCHEMA_NAMESPACE)) {
+ xmlAttrPtr def;
+ def = get_attribute(parent->properties, "attributeFormDefault");
+ if(def == NULL || strncmp(def->children->content, "qualified", sizeof("qualified"))) {
+ newAttr->form = XSD_FORM_UNQUALIFIED;
+ } else {
+ newAttr->form = XSD_FORM_QUALIFIED;
+ }
+ break;
+ }
+ parent = parent->parent;
+ }
+ if(parent == NULL) {
+ newAttr->form = XSD_FORM_UNQUALIFIED;
+ }
+ }
trav = attrType->children;
if (trav != NULL && node_is_equal(trav, "annotation")) {
/* TODO: <annotation> support */