XML Schema support was improved: support for <element> default, fixed and nillable

This commit is contained in:
Dmitry Stogov 2004-02-24 09:02:33 +00:00
parent ac92c47b84
commit feed42e062
3 changed files with 54 additions and 4 deletions

View file

@ -2133,11 +2133,17 @@ static void schema_type_fixup(sdlCtx *ctx, sdlTypePtr type)
if (type->ref != NULL) {
if (ctx->sdl->elements != NULL) {
if (zend_hash_find(ctx->sdl->elements, type->ref, strlen(type->ref)+1, (void**)&tmp) == SUCCESS) {
type->kind = (*tmp)->kind;
type->encode = (*tmp)->encode;
/* TODO: nillable */
if ((*tmp)->nillable) {
type->nillable = 1;
}
if ((*tmp)->fixed) {
type->fixed = estrdup((*tmp)->fixed);
}
if ((*tmp)->def) {
type->def = estrdup((*tmp)->def);
}
} else {
php_error(E_ERROR, "SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute");
}