Lines Matching refs:sdl
25 static int schema_simpleType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpleType, sdlTypePtr cur_type…
26 static int schema_complexType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compType, sdlTypePtr cur_type);
27 static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypePtr cur_type);
28 static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTypePtr cur_type);
29 static int schema_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpCompType, sdlTypePtr cur…
30 static int schema_restriction_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTyp…
31 static int schema_restriction_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTy…
32 static int schema_extension_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePt…
33 static int schema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypeP…
34 static int schema_sequence(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr seqType, sdlTypePtr cur_type, sdl…
35 static int schema_all(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePtr cur_type, sdlConte…
36 static int schema_choice(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr choiceType, sdlTypePtr cur_type, sd…
37 static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTypePtr cur_type, sdlC…
38 static int schema_any(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePtr cur_type, sdlConte…
39 static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTypePtr cur_type, sdlC…
40 static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, s…
41 static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_ty…
49 static encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlChar *… in create_encoder() argument
54 if (sdl->encoders == NULL) { in create_encoder()
55 sdl->encoders = emalloc(sizeof(HashTable)); in create_encoder()
56 zend_hash_init(sdl->encoders, 0, NULL, delete_encoder, 0); in create_encoder()
62 if ((enc_ptr = zend_hash_find_ptr(sdl->encoders, nscat.s)) != NULL) { in create_encoder()
83 zend_hash_update_ptr(sdl->encoders, nscat.s, enc); in create_encoder()
89 static encodePtr get_create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlCh… in get_create_encoder() argument
91 encodePtr enc = get_encoder(sdl, (char*)ns, (char*)type); in get_create_encoder()
93 enc = create_encoder(sdl, cur_type, ns, type); in get_create_encoder()
168 if (!ctx->sdl->types) { in load_schema()
169 ctx->sdl->types = emalloc(sizeof(HashTable)); in load_schema()
170 zend_hash_init(ctx->sdl->types, 0, NULL, delete_type, 0); in load_schema()
273 schema_simpleType(ctx->sdl, tns, trav, NULL); in load_schema()
275 schema_complexType(ctx->sdl, tns, trav, NULL); in load_schema()
277 schema_group(ctx->sdl, tns, trav, NULL, NULL); in load_schema()
279 schema_attributeGroup(ctx->sdl, tns, trav, NULL, ctx); in load_schema()
281 schema_element(ctx->sdl, tns, trav, NULL, NULL); in load_schema()
283 schema_attribute(ctx->sdl, tns, trav, NULL, ctx); in load_schema()
305 static int schema_simpleType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpleType, sdlTypePtr cur_type) in schema_simpleType() argument
331 ptr = zend_hash_next_index_insert_ptr(sdl->types, newType); in schema_simpleType()
333 if (sdl->encoders == NULL) { in schema_simpleType()
334 sdl->encoders = emalloc(sizeof(HashTable)); in schema_simpleType()
335 zend_hash_init(sdl->encoders, 0, NULL, delete_encoder, 0); in schema_simpleType()
344 zend_hash_next_index_insert_ptr(sdl->encoders, cur_type->encode); in schema_simpleType()
358 ptr = zend_hash_next_index_insert_ptr(sdl->types, newType); in schema_simpleType()
368 create_encoder(sdl, cur_type, ns->children->content, name->children->content); in schema_simpleType()
380 schema_restriction_simpleContent(sdl, tns, trav, cur_type, 1); in schema_simpleType()
384 schema_list(sdl, tns, trav, cur_type); in schema_simpleType()
388 schema_union(sdl, tns, trav, cur_type); in schema_simpleType()
411 static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypePtr cur_type) in schema_list() argument
432 newType->encode = get_create_encoder(sdl, newType, nsptr->href, BAD_CAST(type)); in schema_list()
461 char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types)); in schema_list()
476 schema_simpleType(sdl, tns, trav, newType); in schema_list()
494 static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTypePtr cur_type) in schema_union() argument
528 newType->encode = get_create_encoder(sdl, newType, nsptr->href, BAD_CAST(type)); in schema_union()
558 char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types)); in schema_union()
573 schema_simpleType(sdl, tns, trav, newType); in schema_union()
593 static int schema_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpCompType, sdlTypePtr cur… in schema_simpleContent() argument
605 schema_restriction_simpleContent(sdl, tns, trav, cur_type, 0); in schema_simpleContent()
609 schema_extension_simpleContent(sdl, tns, trav, cur_type); in schema_simpleContent()
638 static int schema_restriction_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTyp… in schema_restriction_simpleContent() argument
651 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_restriction_simpleContent()
670 schema_simpleType(sdl, tns, trav, cur_type); in schema_restriction_simpleContent()
715 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_restriction_simpleContent()
717 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_restriction_simpleContent()
743 static int schema_restriction_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTy… in schema_restriction_complexContent() argument
756 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_restriction_complexContent()
771 schema_group(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
774 schema_all(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
777 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
780 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
786 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
788 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
868 static int schema_extension_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePt… in schema_extension_simpleContent() argument
881 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_extension_simpleContent()
896 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_extension_simpleContent()
898 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_extension_simpleContent()
923 static int schema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypeP… in schema_extension_complexContent() argument
936 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_extension_complexContent()
951 schema_group(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
954 schema_all(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
957 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
960 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
966 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
968 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
1015 static int schema_all(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr all, sdlTypePtr cur_type, sdlContentMo… in schema_all() argument
1039 schema_element(sdl, tns, trav, cur_type, newModel); in schema_all()
1059 static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTypePtr cur_type, sdlC… in schema_group() argument
1123 if (sdl->groups == NULL) { in schema_group()
1124 sdl->groups = emalloc(sizeof(HashTable)); in schema_group()
1125 zend_hash_init(sdl->groups, 0, NULL, delete_type, 0); in schema_group()
1127 if (zend_hash_add_ptr(sdl->groups, key.s, newType) == NULL) { in schema_group()
1157 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_group()
1164 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_group()
1171 schema_all(sdl, tns, trav, cur_type, newModel); in schema_group()
1191 static int schema_choice(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr choiceType, sdlTypePtr cur_type, sd… in schema_choice() argument
1215 schema_element(sdl, tns, trav, cur_type, newModel); in schema_choice()
1217 schema_group(sdl, tns, trav, cur_type, newModel); in schema_choice()
1219 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_choice()
1221 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_choice()
1223 schema_any(sdl, tns, trav, cur_type, newModel); in schema_choice()
1241 static int schema_sequence(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr seqType, sdlTypePtr cur_type, sdl… in schema_sequence() argument
1265 schema_element(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1267 schema_group(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1269 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1271 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1273 schema_any(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1293 static int schema_any(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr anyType, sdlTypePtr cur_type, sdlConte… in schema_any() argument
1316 static int schema_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compCont, sdlTypePtr cur_ty… in schema_complexContent() argument
1328 schema_restriction_complexContent(sdl, tns, trav, cur_type); in schema_complexContent()
1332 schema_extension_complexContent(sdl, tns, trav, cur_type); in schema_complexContent()
1359 static int schema_complexType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compType, sdlTypePtr cur_type) in schema_complexType() argument
1386 ptr = zend_hash_next_index_insert_ptr(sdl->types, newType); in schema_complexType()
1388 if (sdl->encoders == NULL) { in schema_complexType()
1389 sdl->encoders = emalloc(sizeof(HashTable)); in schema_complexType()
1390 zend_hash_init(sdl->encoders, 0, NULL, delete_encoder, 0); in schema_complexType()
1399 zend_hash_next_index_insert_ptr(sdl->encoders, cur_type->encode); in schema_complexType()
1412 ptr = zend_hash_next_index_insert_ptr(sdl->types, newType); in schema_complexType()
1415 create_encoder(sdl, cur_type, ns->children->content, name->children->content); in schema_complexType()
1428 schema_simpleContent(sdl, tns, trav, cur_type); in schema_complexType()
1431 schema_complexContent(sdl, tns, trav, cur_type); in schema_complexType()
1435 schema_group(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1438 schema_all(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1441 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1444 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1449 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1451 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1488 static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTypePtr cur_type, sdlC… in schema_element() argument
1547 if (sdl->elements == NULL) { in schema_element()
1548 sdl->elements = emalloc(sizeof(HashTable)); in schema_element()
1549 zend_hash_init(sdl->elements, 0, NULL, delete_type, 0); in schema_element()
1551 addHash = sdl->elements; in schema_element()
1670 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(cptype)); in schema_element()
1688 schema_simpleType(sdl, tns, trav, cur_type); in schema_element()
1696 schema_complexType(sdl, tns, trav, cur_type); in schema_element()
1730 static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, s… in schema_attribute() argument
1817 newAttr->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(cptype)); in schema_attribute()
1930 char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types)); in schema_attribute()
1938 schema_simpleType(sdl, tns, trav, dummy_type); in schema_attribute()
1951 static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrGroup, sdlTypePtr cur_t… in schema_attributeGroup() argument
2029 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_attributeGroup()
2034 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_attributeGroup()
2190 …if (ctx->sdl->groups && (tmp = zend_hash_str_find_ptr(ctx->sdl->groups, model->u.group_ref, strlen… in schema_content_model_fixup()
2234 if (ctx->sdl->elements != NULL) { in schema_type_fixup()
2235 tmp = (sdlTypePtr)schema_find_by_ref(ctx->sdl->elements, type->ref); in schema_type_fixup()
2283 sdlPtr sdl = ctx->sdl; in schema_pass2() local
2297 if (sdl->elements) { in schema_pass2()
2298 ZEND_HASH_FOREACH_PTR(sdl->elements, type) { in schema_pass2()
2302 if (sdl->groups) { in schema_pass2()
2303 ZEND_HASH_FOREACH_PTR(sdl->groups, type) { in schema_pass2()
2307 if (sdl->types) { in schema_pass2()
2308 ZEND_HASH_FOREACH_PTR(sdl->types, type) { in schema_pass2()