Lines Matching refs:ctx

37 …chema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, sdlCtx *ctx);
38 …_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, sdlCtx *ctx);
44 static void schema_type_fixup(sdlCtx *ctx, sdlTypePtr type);
102 static void schema_load_file(sdlCtx *ctx, xmlAttrPtr ns, xmlChar *location, xmlAttrPtr tns, int imp… in schema_load_file() argument
104 !zend_hash_str_exists(&ctx->docs, (char*)location, xmlStrlen(location))) { in schema_load_file()
109 sdl_set_uri_credentials(ctx, (char*)location); in schema_load_file()
111 sdl_restore_uri_credentials(ctx); in schema_load_file()
156 zend_hash_str_add_ptr(&ctx->docs, (char*)location, xmlStrlen(location), doc); in schema_load_file()
157 load_schema(ctx, schema); in schema_load_file()
181 int load_schema(sdlCtx *ctx, xmlNodePtr schema) in load_schema() argument
186 if (!ctx->sdl->types) { in load_schema()
187 ctx->sdl->types = emalloc(sizeof(HashTable)); in load_schema()
188 zend_hash_init(ctx->sdl->types, 0, NULL, delete_type, 0); in load_schema()
190 if (!ctx->attributes) { in load_schema()
191 ctx->attributes = emalloc(sizeof(HashTable)); in load_schema()
192 zend_hash_init(ctx->attributes, 0, NULL, delete_attribute, 0); in load_schema()
194 if (!ctx->attributeGroups) { in load_schema()
195 ctx->attributeGroups = emalloc(sizeof(HashTable)); in load_schema()
196 zend_hash_init(ctx->attributeGroups, 0, NULL, delete_type, 0); in load_schema()
223 schema_load_file(ctx, NULL, uri, tns, 0); in load_schema()
243 schema_load_file(ctx, NULL, uri, tns, 0); in load_schema()
272 schema_load_file(ctx, ns, uri, tns, 1); in load_schema()
291 schema_simpleType(ctx->sdl, tns, trav, NULL); in load_schema()
293 schema_complexType(ctx->sdl, tns, trav, NULL); in load_schema()
295 schema_group(ctx->sdl, tns, trav, NULL, NULL); in load_schema()
297 schema_attributeGroup(ctx->sdl, tns, trav, NULL, ctx); in load_schema()
299 schema_element(ctx->sdl, tns, trav, NULL, NULL); in load_schema()
301 schema_attribute(ctx->sdl, tns, trav, NULL, ctx); in load_schema()
1746 …schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, sdlCtx *ctx) in schema_attribute() argument
1804 addHash = ctx->attributes; in schema_attribute()
1968 …_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrGroup, sdlTypePtr cur_type, sdlCtx *ctx) in schema_attributeGroup() argument
1998 if (zend_hash_add_ptr(ctx->attributeGroups, key.s, newType) == NULL) { in schema_attributeGroup()
2102 static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr) in schema_attribute_fixup() argument
2107 if (ctx->attributes != NULL) { in schema_attribute_fixup()
2108 tmp = (sdlAttributePtr)schema_find_by_ref(ctx->attributes, attr->ref); in schema_attribute_fixup()
2110 schema_attribute_fixup(ctx, tmp); in schema_attribute_fixup()
2150 static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashTable *ht) in schema_attributegroup_fixup() argument
2156 if (ctx->attributeGroups != NULL) { in schema_attributegroup_fixup()
2157 tmp = (sdlTypePtr)schema_find_by_ref(ctx->attributeGroups, attr->ref); in schema_attributegroup_fixup()
2166 schema_attribute_fixup(ctx, tmp_attr); in schema_attributegroup_fixup()
2188 schema_attributegroup_fixup(ctx, tmp_attr, ht); in schema_attributegroup_fixup()
2201 static void schema_content_model_fixup(sdlCtx *ctx, sdlContentModelPtr model) in schema_content_model_fixup() argument
2207 …if (ctx->sdl->groups && (tmp = zend_hash_str_find_ptr(ctx->sdl->groups, model->u.group_ref, strlen… in schema_content_model_fixup()
2208 schema_type_fixup(ctx, tmp); in schema_content_model_fixup()
2237 schema_content_model_fixup(ctx, tmp); in schema_content_model_fixup()
2246 static void schema_type_fixup(sdlCtx *ctx, sdlTypePtr type) in schema_type_fixup() argument
2252 if (ctx->sdl->elements != NULL) { in schema_type_fixup()
2253 tmp = (sdlTypePtr)schema_find_by_ref(ctx->sdl->elements, type->ref); in schema_type_fixup()
2278 schema_type_fixup(ctx, tmp); in schema_type_fixup()
2282 schema_content_model_fixup(ctx, type->model); in schema_type_fixup()
2293 schema_attribute_fixup(ctx, attr); in schema_type_fixup()
2297 schema_attributegroup_fixup(ctx, attr, type->attributes); in schema_type_fixup()
2305 void schema_pass2(sdlCtx *ctx) in schema_pass2() argument
2307 sdlPtr sdl = ctx->sdl; in schema_pass2()
2311 if (ctx->attributes) { in schema_pass2()
2312 ZEND_HASH_FOREACH_PTR(ctx->attributes, attr) { in schema_pass2()
2313 schema_attribute_fixup(ctx, attr); in schema_pass2()
2316 if (ctx->attributeGroups) { in schema_pass2()
2317 ZEND_HASH_MAP_FOREACH_PTR(ctx->attributeGroups, type) { in schema_pass2()
2318 schema_type_fixup(ctx, type); in schema_pass2()
2323 schema_type_fixup(ctx, type); in schema_pass2()
2328 schema_type_fixup(ctx, type); in schema_pass2()
2333 schema_type_fixup(ctx, type); in schema_pass2()
2336 if (ctx->attributes) { in schema_pass2()
2337 zend_hash_destroy(ctx->attributes); in schema_pass2()
2338 efree(ctx->attributes); in schema_pass2()
2340 if (ctx->attributeGroups) { in schema_pass2()
2341 zend_hash_destroy(ctx->attributeGroups); in schema_pass2()
2342 efree(ctx->attributeGroups); in schema_pass2()