Lines Matching refs:sdl
22 static int schema_simpleType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpleType, sdlTypePtr cur_type…
23 static int schema_complexType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compType, sdlTypePtr cur_type);
24 static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypePtr cur_type);
25 static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTypePtr cur_type);
26 static int schema_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpCompType, sdlTypePtr cur…
27 static int schema_restriction_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTyp…
28 static int schema_restriction_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTy…
29 static int schema_extension_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePt…
30 static int schema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypeP…
31 static int schema_sequence(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr seqType, sdlTypePtr cur_type, sdl…
32 static int schema_all(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePtr cur_type, sdlConte…
33 static int schema_choice(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr choiceType, sdlTypePtr cur_type, sd…
34 static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTypePtr cur_type, sdlC…
35 static int schema_any(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePtr cur_type, sdlConte…
36 static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTypePtr cur_type, sdlC…
37 static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, s…
38 static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_ty…
46 static encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlChar *… in create_encoder() argument
51 if (sdl->encoders == NULL) { in create_encoder()
52 sdl->encoders = emalloc(sizeof(HashTable)); in create_encoder()
53 zend_hash_init(sdl->encoders, 0, NULL, delete_encoder, 0); in create_encoder()
59 if ((enc_ptr = zend_hash_find_ptr(sdl->encoders, nscat.s)) != NULL) { in create_encoder()
80 zend_hash_update_ptr(sdl->encoders, nscat.s, enc); in create_encoder()
86 static encodePtr get_create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlCh… in get_create_encoder() argument
88 encodePtr enc = get_encoder(sdl, (char*)ns, (char*)type); in get_create_encoder()
90 enc = create_encoder(sdl, cur_type, ns, type); in get_create_encoder()
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()
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()
323 static int schema_simpleType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpleType, sdlTypePtr cur_type) in schema_simpleType() argument
349 ptr = zend_hash_next_index_insert_ptr(sdl->types, newType); in schema_simpleType()
351 if (sdl->encoders == NULL) { in schema_simpleType()
352 sdl->encoders = emalloc(sizeof(HashTable)); in schema_simpleType()
353 zend_hash_init(sdl->encoders, 0, NULL, delete_encoder, 0); in schema_simpleType()
362 zend_hash_next_index_insert_ptr(sdl->encoders, cur_type->encode); in schema_simpleType()
376 ptr = zend_hash_next_index_insert_ptr(sdl->types, newType); in schema_simpleType()
386 create_encoder(sdl, cur_type, ns->children->content, name->children->content); in schema_simpleType()
398 schema_restriction_simpleContent(sdl, tns, trav, cur_type, 1); in schema_simpleType()
402 schema_list(sdl, tns, trav, cur_type); in schema_simpleType()
406 schema_union(sdl, tns, trav, cur_type); in schema_simpleType()
429 static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypePtr cur_type) in schema_list() argument
450 newType->encode = get_create_encoder(sdl, newType, nsptr->href, BAD_CAST(type)); in schema_list()
479 char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types)); in schema_list()
494 schema_simpleType(sdl, tns, trav, newType); in schema_list()
512 static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTypePtr cur_type) in schema_union() argument
546 newType->encode = get_create_encoder(sdl, newType, nsptr->href, BAD_CAST(type)); in schema_union()
576 char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types)); in schema_union()
591 schema_simpleType(sdl, tns, trav, newType); in schema_union()
611 static int schema_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpCompType, sdlTypePtr cur… in schema_simpleContent() argument
623 schema_restriction_simpleContent(sdl, tns, trav, cur_type, 0); in schema_simpleContent()
627 schema_extension_simpleContent(sdl, tns, trav, cur_type); in schema_simpleContent()
656 static int schema_restriction_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTyp… in schema_restriction_simpleContent() argument
669 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_restriction_simpleContent()
688 schema_simpleType(sdl, tns, trav, cur_type); in schema_restriction_simpleContent()
733 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_restriction_simpleContent()
735 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_restriction_simpleContent()
761 static int schema_restriction_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTy… in schema_restriction_complexContent() argument
774 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_restriction_complexContent()
789 schema_group(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
792 schema_all(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
795 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
798 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
804 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
806 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
886 static int schema_extension_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePt… in schema_extension_simpleContent() argument
899 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_extension_simpleContent()
914 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_extension_simpleContent()
916 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_extension_simpleContent()
941 static int schema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypeP… in schema_extension_complexContent() argument
954 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_extension_complexContent()
969 schema_group(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
972 schema_all(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
975 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
978 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
984 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
986 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
1033 static int schema_all(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr all, sdlTypePtr cur_type, sdlContentMo… in schema_all() argument
1057 schema_element(sdl, tns, trav, cur_type, newModel); in schema_all()
1077 static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTypePtr cur_type, sdlC… in schema_group() argument
1141 if (sdl->groups == NULL) { in schema_group()
1142 sdl->groups = emalloc(sizeof(HashTable)); in schema_group()
1143 zend_hash_init(sdl->groups, 0, NULL, delete_type, 0); in schema_group()
1145 if (zend_hash_add_ptr(sdl->groups, key.s, newType) == NULL) { in schema_group()
1175 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_group()
1182 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_group()
1189 schema_all(sdl, tns, trav, cur_type, newModel); in schema_group()
1209 static int schema_choice(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr choiceType, sdlTypePtr cur_type, sd… in schema_choice() argument
1233 schema_element(sdl, tns, trav, cur_type, newModel); in schema_choice()
1235 schema_group(sdl, tns, trav, cur_type, newModel); in schema_choice()
1237 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_choice()
1239 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_choice()
1241 schema_any(sdl, tns, trav, cur_type, newModel); in schema_choice()
1259 static int schema_sequence(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr seqType, sdlTypePtr cur_type, sdl… in schema_sequence() argument
1283 schema_element(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1285 schema_group(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1287 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1289 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1291 schema_any(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1311 static int schema_any(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr anyType, sdlTypePtr cur_type, sdlConte… in schema_any() argument
1334 static int schema_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compCont, sdlTypePtr cur_ty… in schema_complexContent() argument
1346 schema_restriction_complexContent(sdl, tns, trav, cur_type); in schema_complexContent()
1350 schema_extension_complexContent(sdl, tns, trav, cur_type); in schema_complexContent()
1377 static int schema_complexType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compType, sdlTypePtr cur_type) in schema_complexType() argument
1404 ptr = zend_hash_next_index_insert_ptr(sdl->types, newType); in schema_complexType()
1406 if (sdl->encoders == NULL) { in schema_complexType()
1407 sdl->encoders = emalloc(sizeof(HashTable)); in schema_complexType()
1408 zend_hash_init(sdl->encoders, 0, NULL, delete_encoder, 0); in schema_complexType()
1417 zend_hash_next_index_insert_ptr(sdl->encoders, cur_type->encode); in schema_complexType()
1430 ptr = zend_hash_next_index_insert_ptr(sdl->types, newType); in schema_complexType()
1433 create_encoder(sdl, cur_type, ns->children->content, name->children->content); in schema_complexType()
1446 schema_simpleContent(sdl, tns, trav, cur_type); in schema_complexType()
1449 schema_complexContent(sdl, tns, trav, cur_type); in schema_complexType()
1453 schema_group(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1456 schema_all(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1459 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1462 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1467 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1469 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1506 static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTypePtr cur_type, sdlC… in schema_element() argument
1565 if (sdl->elements == NULL) { in schema_element()
1566 sdl->elements = emalloc(sizeof(HashTable)); in schema_element()
1567 zend_hash_init(sdl->elements, 0, NULL, delete_type, 0); in schema_element()
1569 addHash = sdl->elements; in schema_element()
1686 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(cptype)); in schema_element()
1704 schema_simpleType(sdl, tns, trav, cur_type); in schema_element()
1712 schema_complexType(sdl, tns, trav, cur_type); in schema_element()
1746 static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, s… in schema_attribute() argument
1834 newAttr->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(cptype)); in schema_attribute()
1947 char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, zend_hash_num_elements(sdl->types)); in schema_attribute()
1955 schema_simpleType(sdl, tns, trav, dummy_type); in schema_attribute()
1968 static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrGroup, sdlTypePtr cur_t… in schema_attributeGroup() argument
2046 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_attributeGroup()
2051 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_attributeGroup()
2207 …if (ctx->sdl->groups && (tmp = zend_hash_str_find_ptr(ctx->sdl->groups, model->u.group_ref, strlen… in schema_content_model_fixup()
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()
2307 sdlPtr sdl = ctx->sdl; in schema_pass2() local
2321 if (sdl->elements) { in schema_pass2()
2322 ZEND_HASH_MAP_FOREACH_PTR(sdl->elements, type) { in schema_pass2()
2326 if (sdl->groups) { in schema_pass2()
2327 ZEND_HASH_MAP_FOREACH_PTR(sdl->groups, type) { in schema_pass2()
2331 if (sdl->types) { in schema_pass2()
2332 ZEND_HASH_FOREACH_PTR(sdl->types, type) { in schema_pass2()