Lines Matching refs:type

46 static void schema_type_fixup(sdlCtx *ctx, sdlTypePtr type);
48 …c encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlChar *type) in create_encoder() argument
59 smart_str_appends(&nscat, (char*)type); in create_encoder()
76 enc->details.type_str = estrdup((char*)type); in create_encoder()
88 …codePtr get_create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlChar *type) in get_create_encoder() argument
90 encodePtr enc = get_encoder(sdl, (char*)ns, (char*)type); in get_create_encoder()
92 enc = create_encoder(sdl, cur_type, ns, type); in get_create_encoder()
417 char *type, *ns; in schema_list() local
420 parse_namespace(itemType->children->content, &type, &ns); in schema_list()
428 newType->name = estrdup(type); in schema_list()
431 newType->encode = get_create_encoder(sdl, newType, nsptr->href, BAD_CAST(type)); in schema_list()
439 if (type) {efree(type);} in schema_list()
501 char *type, *ns; in schema_union() local
516 parse_namespace(BAD_CAST(start), &type, &ns); in schema_union()
524 newType->name = estrdup(type); in schema_union()
527 newType->encode = get_create_encoder(sdl, newType, nsptr->href, BAD_CAST(type)); in schema_union()
535 if (type) {efree(type);} in schema_union()
644 char *type, *ns; in schema_restriction_simpleContent() local
647 parse_namespace(base->children->content, &type, &ns); in schema_restriction_simpleContent()
650 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_restriction_simpleContent()
652 if (type) {efree(type);} in schema_restriction_simpleContent()
749 char *type, *ns; in schema_restriction_complexContent() local
752 parse_namespace(base->children->content, &type, &ns); in schema_restriction_complexContent()
755 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_restriction_complexContent()
757 if (type) {efree(type);} in schema_restriction_complexContent()
874 char *type, *ns; in schema_extension_simpleContent() local
877 parse_namespace(base->children->content, &type, &ns); in schema_extension_simpleContent()
880 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_extension_simpleContent()
882 if (type) {efree(type);} in schema_extension_simpleContent()
929 char *type, *ns; in schema_extension_complexContent() local
932 parse_namespace(base->children->content, &type, &ns); in schema_extension_complexContent()
935 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_extension_complexContent()
937 if (type) {efree(type);} in schema_extension_complexContent()
1078 char *type, *ns; in schema_group() local
1081 parse_namespace(ref->children->content, &type, &ns); in schema_group()
1095 smart_str_appends(&key, type); in schema_group()
1102 if (type) {efree(type);} in schema_group()
1490 xmlAttrPtr attrs, attr, ns, name, type, ref = NULL; in schema_element() local
1513 char *type, *ns; in schema_element() local
1516 parse_namespace(ref->children->content, &type, &ns); in schema_element()
1531 smart_str_appends(&nscat, type); in schema_element()
1532 newType->name = estrdup(type); in schema_element()
1534 if (type) {efree(type);} in schema_element()
1656 type = get_attribute(attrs, "type"); in schema_element()
1657 if (type) { in schema_element()
1664 parse_namespace(type->children->content, &cptype, &str_ns); in schema_element()
1682 } else if (type != NULL) { in schema_element()
1690 } else if (type != NULL) { in schema_element()
1730 xmlAttrPtr attr, name, ref = NULL, type = NULL; in schema_attribute() local
1804 type = get_attribute(attrType->properties, "type"); in schema_attribute()
1805 if (type) { in schema_attribute()
1812 parse_namespace(type->children->content, &cptype, &str_ns); in schema_attribute()
1921 } else if (type != NULL) { in schema_attribute()
2226 static void schema_type_fixup(sdlCtx *ctx, sdlTypePtr type) in schema_type_fixup() argument
2231 if (type->ref != NULL) { in schema_type_fixup()
2233 tmp = (sdlTypePtr)schema_find_by_ref(ctx->sdl->elements, type->ref); in schema_type_fixup()
2235 type->kind = tmp->kind; in schema_type_fixup()
2236 type->encode = tmp->encode; in schema_type_fixup()
2238 type->nillable = 1; in schema_type_fixup()
2241 type->fixed = estrdup(tmp->fixed); in schema_type_fixup()
2244 type->def = estrdup(tmp->def); in schema_type_fixup()
2246 type->form = tmp->form; in schema_type_fixup()
2247 } else if (strcmp(type->ref, SCHEMA_NAMESPACE ":schema") == 0) { in schema_type_fixup()
2248 type->encode = get_conversion(XSD_ANYXML); in schema_type_fixup()
2250 soap_error1(E_ERROR, "Parsing Schema: unresolved element 'ref' attribute '%s'", type->ref); in schema_type_fixup()
2253 efree(type->ref); in schema_type_fixup()
2254 type->ref = NULL; in schema_type_fixup()
2256 if (type->elements) { in schema_type_fixup()
2257 ZEND_HASH_FOREACH_PTR(type->elements, tmp) { in schema_type_fixup()
2261 if (type->model) { in schema_type_fixup()
2262 schema_content_model_fixup(ctx, type->model); in schema_type_fixup()
2264 if (type->attributes) { in schema_type_fixup()
2268 ZEND_HASH_FOREACH_KEY_PTR(type->attributes, index, str_key, attr) { in schema_type_fixup()
2272 schema_attributegroup_fixup(ctx, attr, type->attributes); in schema_type_fixup()
2273 zend_hash_index_del(type->attributes, index); in schema_type_fixup()
2283 sdlTypePtr type; in schema_pass2() local
2291 ZEND_HASH_FOREACH_PTR(ctx->attributeGroups, type) { in schema_pass2()
2292 schema_type_fixup(ctx, type); in schema_pass2()
2296 ZEND_HASH_FOREACH_PTR(sdl->elements, type) { in schema_pass2()
2297 schema_type_fixup(ctx, type); in schema_pass2()
2301 ZEND_HASH_FOREACH_PTR(sdl->groups, type) { in schema_pass2()
2302 schema_type_fixup(ctx, type); in schema_pass2()
2306 ZEND_HASH_FOREACH_PTR(sdl->types, type) { in schema_pass2()
2307 schema_type_fixup(ctx, type); in schema_pass2()
2370 sdlTypePtr type = Z_PTR_P(zv); in delete_type() local
2372 if (type->name) { in delete_type()
2373 efree(type->name); in delete_type()
2375 if (type->namens) { in delete_type()
2376 efree(type->namens); in delete_type()
2378 if (type->def) { in delete_type()
2379 efree(type->def); in delete_type()
2381 if (type->fixed) { in delete_type()
2382 efree(type->fixed); in delete_type()
2384 if (type->elements) { in delete_type()
2385 zend_hash_destroy(type->elements); in delete_type()
2386 efree(type->elements); in delete_type()
2388 if (type->attributes) { in delete_type()
2389 zend_hash_destroy(type->attributes); in delete_type()
2390 efree(type->attributes); in delete_type()
2392 if (type->model) { in delete_type()
2394 ZVAL_PTR(&zv, type->model); in delete_type()
2397 if (type->restrictions) { in delete_type()
2398 delete_restriction_var_int(type->restrictions->minExclusive); in delete_type()
2399 delete_restriction_var_int(type->restrictions->minInclusive); in delete_type()
2400 delete_restriction_var_int(type->restrictions->maxExclusive); in delete_type()
2401 delete_restriction_var_int(type->restrictions->maxInclusive); in delete_type()
2402 delete_restriction_var_int(type->restrictions->totalDigits); in delete_type()
2403 delete_restriction_var_int(type->restrictions->fractionDigits); in delete_type()
2404 delete_restriction_var_int(type->restrictions->length); in delete_type()
2405 delete_restriction_var_int(type->restrictions->minLength); in delete_type()
2406 delete_restriction_var_int(type->restrictions->maxLength); in delete_type()
2407 delete_restriction_var_char_int(type->restrictions->whiteSpace); in delete_type()
2408 delete_restriction_var_char_int(type->restrictions->pattern); in delete_type()
2409 if (type->restrictions->enumeration) { in delete_type()
2410 zend_hash_destroy(type->restrictions->enumeration); in delete_type()
2411 efree(type->restrictions->enumeration); in delete_type()
2413 efree(type->restrictions); in delete_type()
2415 efree(type); in delete_type()
2420 sdlTypePtr type = Z_PTR_P(zv); in delete_type_persistent() local
2421 if (type->name) { in delete_type_persistent()
2422 free(type->name); in delete_type_persistent()
2424 if (type->namens) { in delete_type_persistent()
2425 free(type->namens); in delete_type_persistent()
2427 if (type->def) { in delete_type_persistent()
2428 free(type->def); in delete_type_persistent()
2430 if (type->fixed) { in delete_type_persistent()
2431 free(type->fixed); in delete_type_persistent()
2433 if (type->elements) { in delete_type_persistent()
2434 zend_hash_destroy(type->elements); in delete_type_persistent()
2435 free(type->elements); in delete_type_persistent()
2437 if (type->attributes) { in delete_type_persistent()
2438 zend_hash_destroy(type->attributes); in delete_type_persistent()
2439 free(type->attributes); in delete_type_persistent()
2441 if (type->model) { in delete_type_persistent()
2442 delete_model_persistent_int(type->model); in delete_type_persistent()
2444 if (type->restrictions) { in delete_type_persistent()
2445 delete_restriction_var_int_persistent(type->restrictions->minExclusive); in delete_type_persistent()
2446 delete_restriction_var_int_persistent(type->restrictions->minInclusive); in delete_type_persistent()
2447 delete_restriction_var_int_persistent(type->restrictions->maxExclusive); in delete_type_persistent()
2448 delete_restriction_var_int_persistent(type->restrictions->maxInclusive); in delete_type_persistent()
2449 delete_restriction_var_int_persistent(type->restrictions->totalDigits); in delete_type_persistent()
2450 delete_restriction_var_int_persistent(type->restrictions->fractionDigits); in delete_type_persistent()
2451 delete_restriction_var_int_persistent(type->restrictions->length); in delete_type_persistent()
2452 delete_restriction_var_int_persistent(type->restrictions->minLength); in delete_type_persistent()
2453 delete_restriction_var_int_persistent(type->restrictions->maxLength); in delete_type_persistent()
2454 delete_restriction_var_char_persistent_int(type->restrictions->whiteSpace); in delete_type_persistent()
2455 delete_restriction_var_char_persistent_int(type->restrictions->pattern); in delete_type_persistent()
2456 if (type->restrictions->enumeration) { in delete_type_persistent()
2457 zend_hash_destroy(type->restrictions->enumeration); in delete_type_persistent()
2458 free(type->restrictions->enumeration); in delete_type_persistent()
2460 free(type->restrictions); in delete_type_persistent()
2462 free(type); in delete_type_persistent()