Lines Matching refs:cur_type

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 …int schema_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpCompType, sdlTypePtr cur_type);
30 …impleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTypePtr cur_type, int simpleType);
31 …a_restriction_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTypePtr cur_type);
32 …chema_extension_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePtr cur_type);
33 …hema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePtr cur_type);
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 …_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, sdlCtx *ctx);
49 static encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlChar *… in create_encoder() argument
78 enc->details.sdl_type = cur_type; in create_encoder()
89 static encodePtr get_create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlCh… in get_create_encoder() argument
93 enc = create_encoder(sdl, cur_type, ns, type); in get_create_encoder()
305 static int schema_simpleType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpleType, sdlTypePtr cur_type) in schema_simpleType() argument
316 if (cur_type != NULL) { in schema_simpleType()
327 newType->name = estrdup(cur_type->name); in schema_simpleType()
328 newType->namens = estrdup(cur_type->namens); in schema_simpleType()
337 cur_type->encode = emalloc(sizeof(encode)); in schema_simpleType()
338 memset(cur_type->encode, 0, sizeof(encode)); in schema_simpleType()
339 cur_type->encode->details.ns = estrdup(newType->namens); in schema_simpleType()
340 cur_type->encode->details.type_str = estrdup(newType->name); in schema_simpleType()
341 cur_type->encode->details.sdl_type = *ptr; in schema_simpleType()
342 cur_type->encode->to_xml = sdl_guess_convert_xml; in schema_simpleType()
343 cur_type->encode->to_zval = sdl_guess_convert_zval; in schema_simpleType()
344 zend_hash_next_index_insert(sdl->encoders, &cur_type->encode, sizeof(encodePtr), NULL); in schema_simpleType()
346 cur_type =*ptr; in schema_simpleType()
357 if (cur_type == NULL) { in schema_simpleType()
360 if (cur_type->elements == NULL) { in schema_simpleType()
361 cur_type->elements = emalloc(sizeof(HashTable)); in schema_simpleType()
362 zend_hash_init(cur_type->elements, 0, NULL, delete_type, 0); in schema_simpleType()
364 …zend_hash_update(cur_type->elements, newType->name, strlen(newType->name)+1, &newType, sizeof(sdlT… in schema_simpleType()
366 cur_type = (*ptr); 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()
383 cur_type->kind = XSD_TYPEKIND_LIST; in schema_simpleType()
384 schema_list(sdl, tns, trav, cur_type); in schema_simpleType()
387 cur_type->kind = XSD_TYPEKIND_UNION; 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
434 if (cur_type->elements == NULL) { in schema_list()
435 cur_type->elements = emalloc(sizeof(HashTable)); in schema_list()
436 zend_hash_init(cur_type->elements, 0, NULL, delete_type, 0); in schema_list()
438 zend_hash_next_index_insert(cur_type->elements, &newType, sizeof(sdlTypePtr), (void **)&tmp); in schema_list()
469 if (cur_type->elements == NULL) { in schema_list()
470 cur_type->elements = emalloc(sizeof(HashTable)); in schema_list()
471 zend_hash_init(cur_type->elements, 0, NULL, delete_type, 0); in schema_list()
473 zend_hash_next_index_insert(cur_type->elements, &newType, sizeof(sdlTypePtr), (void **)&tmp); in schema_list()
493 static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTypePtr cur_type) in schema_union() argument
529 if (cur_type->elements == NULL) { in schema_union()
530 cur_type->elements = emalloc(sizeof(HashTable)); in schema_union()
531 zend_hash_init(cur_type->elements, 0, NULL, delete_type, 0); in schema_union()
533 zend_hash_next_index_insert(cur_type->elements, &newType, sizeof(sdlTypePtr), (void **)&tmp); in schema_union()
565 if (cur_type->elements == NULL) { in schema_union()
566 cur_type->elements = emalloc(sizeof(HashTable)); in schema_union()
567 zend_hash_init(cur_type->elements, 0, NULL, delete_type, 0); in schema_union()
569 zend_hash_next_index_insert(cur_type->elements, &newType, sizeof(sdlTypePtr), (void **)&tmp); in schema_union()
591 … int schema_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpCompType, sdlTypePtr cur_type) in schema_simpleContent() argument
602 cur_type->kind = XSD_TYPEKIND_RESTRICTION; in schema_simpleContent()
603 schema_restriction_simpleContent(sdl, tns, trav, cur_type, 0); in schema_simpleContent()
606 cur_type->kind = XSD_TYPEKIND_EXTENSION; in schema_simpleContent()
607 schema_extension_simpleContent(sdl, tns, trav, cur_type); in schema_simpleContent()
636 …simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTypePtr cur_type, int simpleType) in schema_restriction_simpleContent() argument
649 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_restriction_simpleContent()
657 if (cur_type->restrictions == NULL) { in schema_restriction_simpleContent()
658 cur_type->restrictions = emalloc(sizeof(sdlRestrictions)); in schema_restriction_simpleContent()
659 memset(cur_type->restrictions, 0, sizeof(sdlRestrictions)); in schema_restriction_simpleContent()
668 schema_simpleType(sdl, tns, trav, cur_type); in schema_restriction_simpleContent()
673 schema_restriction_var_int(trav, &cur_type->restrictions->minExclusive); in schema_restriction_simpleContent()
675 schema_restriction_var_int(trav, &cur_type->restrictions->minInclusive); in schema_restriction_simpleContent()
677 schema_restriction_var_int(trav, &cur_type->restrictions->maxExclusive); in schema_restriction_simpleContent()
679 schema_restriction_var_int(trav, &cur_type->restrictions->maxInclusive); in schema_restriction_simpleContent()
681 schema_restriction_var_int(trav, &cur_type->restrictions->totalDigits); in schema_restriction_simpleContent()
683 schema_restriction_var_int(trav, &cur_type->restrictions->fractionDigits); in schema_restriction_simpleContent()
685 schema_restriction_var_int(trav, &cur_type->restrictions->length); in schema_restriction_simpleContent()
687 schema_restriction_var_int(trav, &cur_type->restrictions->minLength); in schema_restriction_simpleContent()
689 schema_restriction_var_int(trav, &cur_type->restrictions->maxLength); in schema_restriction_simpleContent()
691 schema_restriction_var_char(trav, &cur_type->restrictions->whiteSpace); in schema_restriction_simpleContent()
693 schema_restriction_var_char(trav, &cur_type->restrictions->pattern); in schema_restriction_simpleContent()
698 if (cur_type->restrictions->enumeration == NULL) { in schema_restriction_simpleContent()
699 cur_type->restrictions->enumeration = emalloc(sizeof(HashTable)); in schema_restriction_simpleContent()
700 zend_hash_init(cur_type->restrictions->enumeration, 0, NULL, delete_restriction_var_char, 0); in schema_restriction_simpleContent()
702 …if (zend_hash_add(cur_type->restrictions->enumeration, enumval->value, strlen(enumval->value)+1, &… in schema_restriction_simpleContent()
713 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_restriction_simpleContent()
715 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_restriction_simpleContent()
741 …ma_restriction_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr restType, sdlTypePtr cur_type) in schema_restriction_complexContent() argument
754 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_restriction_complexContent()
769 schema_group(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
772 schema_all(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
775 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
778 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
784 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
786 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_restriction_complexContent()
866 …schema_extension_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePtr cur_type) in schema_extension_simpleContent() argument
879 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_extension_simpleContent()
894 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_extension_simpleContent()
896 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_extension_simpleContent()
921 …chema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr extType, sdlTypePtr cur_type) in schema_extension_complexContent() argument
934 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type)); in schema_extension_complexContent()
949 schema_group(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
952 schema_all(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
955 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
958 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
964 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
966 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_extension_complexContent()
1013 static int schema_all(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr all, sdlTypePtr cur_type, sdlContentMo… in schema_all() argument
1023 cur_type->model = newModel; in schema_all()
1037 schema_element(sdl, tns, trav, cur_type, newModel); in schema_all()
1057 static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTypePtr cur_type, sdlC… in schema_group() argument
1115 if (cur_type == NULL) { in schema_group()
1129 cur_type = newType; in schema_group()
1134 cur_type->model = newModel; in schema_group()
1155 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_group()
1162 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_group()
1169 schema_all(sdl, tns, trav, cur_type, newModel); in schema_group()
1189 static int schema_choice(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr choiceType, sdlTypePtr cur_type, sd… in schema_choice() argument
1199 cur_type->model = newModel; in schema_choice()
1213 schema_element(sdl, tns, trav, cur_type, newModel); in schema_choice()
1215 schema_group(sdl, tns, trav, cur_type, newModel); in schema_choice()
1217 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_choice()
1219 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_choice()
1221 schema_any(sdl, tns, trav, cur_type, newModel); in schema_choice()
1239 static int schema_sequence(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr seqType, sdlTypePtr cur_type, sdl… in schema_sequence() argument
1249 cur_type->model = newModel; in schema_sequence()
1263 schema_element(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1265 schema_group(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1267 schema_choice(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1269 schema_sequence(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1271 schema_any(sdl, tns, trav, cur_type, newModel); in schema_sequence()
1291 static int schema_any(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr anyType, sdlTypePtr cur_type, sdlConte… in schema_any() argument
1314 …tic int schema_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compCont, sdlTypePtr cur_type) in schema_complexContent() argument
1325 cur_type->kind = XSD_TYPEKIND_RESTRICTION; in schema_complexContent()
1326 schema_restriction_complexContent(sdl, tns, trav, cur_type); in schema_complexContent()
1329 cur_type->kind = XSD_TYPEKIND_EXTENSION; in schema_complexContent()
1330 schema_extension_complexContent(sdl, tns, trav, cur_type); in schema_complexContent()
1357 static int schema_complexType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compType, sdlTypePtr cur_type) in schema_complexType() argument
1369 if (cur_type != NULL) { in schema_complexType()
1380 newType->name = estrdup(cur_type->name); in schema_complexType()
1381 newType->namens = estrdup(cur_type->namens); in schema_complexType()
1390 cur_type->encode = emalloc(sizeof(encode)); in schema_complexType()
1391 memset(cur_type->encode, 0, sizeof(encode)); in schema_complexType()
1392 cur_type->encode->details.ns = estrdup(newType->namens); in schema_complexType()
1393 cur_type->encode->details.type_str = estrdup(newType->name); in schema_complexType()
1394 cur_type->encode->details.sdl_type = *ptr; in schema_complexType()
1395 cur_type->encode->to_xml = sdl_guess_convert_xml; in schema_complexType()
1396 cur_type->encode->to_zval = sdl_guess_convert_zval; in schema_complexType()
1397 zend_hash_next_index_insert(sdl->encoders, &cur_type->encode, sizeof(encodePtr), NULL); in schema_complexType()
1399 cur_type =*ptr; in schema_complexType()
1412 cur_type = (*ptr); in schema_complexType()
1413 create_encoder(sdl, cur_type, ns->children->content, name->children->content); in schema_complexType()
1426 schema_simpleContent(sdl, tns, trav, cur_type); in schema_complexType()
1429 schema_complexContent(sdl, tns, trav, cur_type); in schema_complexType()
1433 schema_group(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1436 schema_all(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1439 schema_choice(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1442 schema_sequence(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1447 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1449 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_complexType()
1486 static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTypePtr cur_type, sdlC… in schema_element() argument
1544 if (cur_type == NULL) { in schema_element()
1554 if (cur_type->elements == NULL) { in schema_element()
1555 cur_type->elements = emalloc(sizeof(HashTable)); in schema_element()
1556 zend_hash_init(cur_type->elements, 0, NULL, delete_type, 0); in schema_element()
1558 addHash = cur_type->elements; in schema_element()
1564 if (cur_type == NULL) { in schema_element()
1583 cur_type = newType; in schema_element()
1597 cur_type->nillable = TRUE; in schema_element()
1599 cur_type->nillable = FALSE; in schema_element()
1602 cur_type->nillable = FALSE; in schema_element()
1610 cur_type->fixed = estrdup((char*)attr->children->content); in schema_element()
1620 cur_type->def = estrdup((char*)attr->children->content); in schema_element()
1627 cur_type->form = XSD_FORM_QUALIFIED; in schema_element()
1629 cur_type->form = XSD_FORM_UNQUALIFIED; in schema_element()
1631 cur_type->form = XSD_FORM_DEFAULT; in schema_element()
1634 cur_type->form = XSD_FORM_DEFAULT; in schema_element()
1636 if (cur_type->form == XSD_FORM_DEFAULT) { in schema_element()
1643 cur_type->form = XSD_FORM_UNQUALIFIED; in schema_element()
1645 cur_type->form = XSD_FORM_QUALIFIED; in schema_element()
1652 cur_type->form = XSD_FORM_UNQUALIFIED; in schema_element()
1668 cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(cptype)); in schema_element()
1686 schema_simpleType(sdl, tns, trav, cur_type); in schema_element()
1694 schema_complexType(sdl, tns, trav, cur_type); in schema_element()
1728 static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdlTypePtr cur_type, s… in schema_attribute() argument
1785 if (cur_type == NULL) { in schema_attribute()
1788 if (cur_type->attributes == NULL) { in schema_attribute()
1789 cur_type->attributes = emalloc(sizeof(HashTable)); in schema_attribute()
1790 zend_hash_init(cur_type->attributes, 0, NULL, delete_attribute, 0); in schema_attribute()
1792 addHash = cur_type->attributes; in schema_attribute()
1815 newAttr->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(cptype)); in schema_attribute()
1945 …_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrGroup, sdlTypePtr cur_type, sdlCtx *ctx) in schema_attributeGroup() argument
1956 if (cur_type == NULL) { in schema_attributeGroup()
1978 cur_type = newType; in schema_attributeGroup()
1986 if (cur_type->attributes == NULL) { in schema_attributeGroup()
1987 cur_type->attributes = emalloc(sizeof(HashTable)); in schema_attributeGroup()
1988 zend_hash_init(cur_type->attributes, 0, NULL, delete_attribute, 0); in schema_attributeGroup()
2006 zend_hash_next_index_insert(cur_type->attributes, &newAttr, sizeof(sdlAttributePtr), NULL); in schema_attributeGroup()
2007 cur_type = NULL; in schema_attributeGroup()
2023 schema_attribute(sdl, tns, trav, cur_type, NULL); in schema_attributeGroup()
2028 schema_attributeGroup(sdl, tns, trav, cur_type, NULL); in schema_attributeGroup()