mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
XML Schema support was improved: support for <element> default, fixed and nillable
This commit is contained in:
parent
ac92c47b84
commit
feed42e062
3 changed files with 54 additions and 4 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue