Lines Matching refs:attr
984 xmlAttrPtr attr = get_attribute(node->properties, "minOccurs"); in schema_min_max() local
986 if (attr) { in schema_min_max()
987 model->min_occurs = atoi((char*)attr->children->content); in schema_min_max()
992 attr = get_attribute(node->properties, "maxOccurs"); in schema_min_max()
993 if (attr) { in schema_min_max()
994 if (!strncmp((char*)attr->children->content, "unbounded", sizeof("unbounded"))) { in schema_min_max()
997 model->max_occurs = atoi((char*)attr->children->content); in schema_min_max()
1489 xmlAttrPtr attrs, attr, ns, name, type, ref = NULL; in schema_element() local
1590 attr = get_attribute(attrs, "nillable"); in schema_element()
1591 if (attr) { in schema_element()
1595 if (!stricmp((char*)attr->children->content, "true") || in schema_element()
1596 !stricmp((char*)attr->children->content, "1")) { in schema_element()
1605 attr = get_attribute(attrs, "fixed"); in schema_element()
1606 if (attr) { in schema_element()
1610 cur_type->fixed = estrdup((char*)attr->children->content); in schema_element()
1613 attr = get_attribute(attrs, "default"); in schema_element()
1614 if (attr) { in schema_element()
1620 cur_type->def = estrdup((char*)attr->children->content); in schema_element()
1624 attr = get_attribute(attrs, "form"); in schema_element()
1625 if (attr) { in schema_element()
1626 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_element()
1628 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_element()
1731 xmlAttrPtr attr, name, ref = NULL, type = NULL; in schema_attribute() local
1821 attr = attrType->properties; in schema_attribute()
1822 while (attr != NULL) { in schema_attribute()
1823 if (attr_is_equal_ex(attr, "default", SCHEMA_NAMESPACE)) { in schema_attribute()
1824 newAttr->def = estrdup((char*)attr->children->content); in schema_attribute()
1825 } else if (attr_is_equal_ex(attr, "fixed", SCHEMA_NAMESPACE)) { in schema_attribute()
1826 newAttr->fixed = estrdup((char*)attr->children->content); in schema_attribute()
1827 } else if (attr_is_equal_ex(attr, "form", SCHEMA_NAMESPACE)) { in schema_attribute()
1828 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_attribute()
1830 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_attribute()
1835 } else if (attr_is_equal_ex(attr, "id", SCHEMA_NAMESPACE)) { in schema_attribute()
1837 } else if (attr_is_equal_ex(attr, "name", SCHEMA_NAMESPACE)) { in schema_attribute()
1838 newAttr->name = estrdup((char*)attr->children->content); in schema_attribute()
1839 } else if (attr_is_equal_ex(attr, "ref", SCHEMA_NAMESPACE)) { in schema_attribute()
1841 } else if (attr_is_equal_ex(attr, "type", SCHEMA_NAMESPACE)) { in schema_attribute()
1843 } else if (attr_is_equal_ex(attr, "use", SCHEMA_NAMESPACE)) { in schema_attribute()
1844 if (strncmp((char*)attr->children->content, "prohibited", sizeof("prohibited")) == 0) { in schema_attribute()
1846 } else if (strncmp((char*)attr->children->content, "required", sizeof("required")) == 0) { in schema_attribute()
1848 } else if (strncmp((char*)attr->children->content, "optional", sizeof("optional")) == 0) { in schema_attribute()
1854 xmlNsPtr nsPtr = attr_find_ns(attr); in schema_attribute()
1864 parse_namespace(attr->children->content, &value, &ns); in schema_attribute()
1865 nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns)); in schema_attribute()
1870 ext->val = estrdup((char*)attr->children->content); in schema_attribute()
1882 smart_str_appends(&key2, (char*)attr->name); in schema_attribute()
1888 attr = attr->next; in schema_attribute()
2049 sdlExtraAttributePtr *attr = (sdlExtraAttributePtr*)attribute; in copy_extra_attribute() local
2053 memcpy(new_attr, *attr, sizeof(sdlExtraAttribute)); in copy_extra_attribute()
2054 *attr = new_attr; in copy_extra_attribute()
2080 static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr) in schema_attribute_fixup() argument
2084 if (attr->ref != NULL) { in schema_attribute_fixup()
2086 tmp = (sdlAttributePtr*)schema_find_by_ref(ctx->attributes, attr->ref); in schema_attribute_fixup()
2089 if ((*tmp)->name != NULL && attr->name == NULL) { in schema_attribute_fixup()
2090 attr->name = estrdup((*tmp)->name); in schema_attribute_fixup()
2092 if ((*tmp)->namens != NULL && attr->namens == NULL) { in schema_attribute_fixup()
2093 attr->namens = estrdup((*tmp)->namens); in schema_attribute_fixup()
2095 if ((*tmp)->def != NULL && attr->def == NULL) { in schema_attribute_fixup()
2096 attr->def = estrdup((*tmp)->def); in schema_attribute_fixup()
2098 if ((*tmp)->fixed != NULL && attr->fixed == NULL) { in schema_attribute_fixup()
2099 attr->fixed = estrdup((*tmp)->fixed); in schema_attribute_fixup()
2101 if (attr->form == XSD_FORM_DEFAULT) { in schema_attribute_fixup()
2102 attr->form = (*tmp)->form; in schema_attribute_fixup()
2104 if (attr->use == XSD_USE_DEFAULT) { in schema_attribute_fixup()
2105 attr->use = (*tmp)->use; in schema_attribute_fixup()
2110 attr->extraAttributes = emalloc(sizeof(HashTable)); in schema_attribute_fixup()
2111 …zend_hash_init(attr->extraAttributes, zend_hash_num_elements((*tmp)->extraAttributes), NULL, delet… in schema_attribute_fixup()
2112 …zend_hash_copy(attr->extraAttributes, (*tmp)->extraAttributes, copy_extra_attribute, &node, sizeof… in schema_attribute_fixup()
2114 attr->encode = (*tmp)->encode; in schema_attribute_fixup()
2117 if (attr->name == NULL && attr->ref != NULL) { in schema_attribute_fixup()
2118 char *name = strrchr(attr->ref, ':'); in schema_attribute_fixup()
2120 attr->name = estrdup(name+1); in schema_attribute_fixup()
2122 attr->name = estrdup(attr->ref); in schema_attribute_fixup()
2125 efree(attr->ref); in schema_attribute_fixup()
2126 attr->ref = NULL; in schema_attribute_fixup()
2130 static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashTable *ht) in schema_attributegroup_fixup() argument
2135 if (attr->ref != NULL) { in schema_attributegroup_fixup()
2137 tmp = (sdlTypePtr*)schema_find_by_ref(ctx->attributeGroups, attr->ref); in schema_attributegroup_fixup()
2178 efree(attr->ref); in schema_attributegroup_fixup()
2179 attr->ref = NULL; in schema_attributegroup_fixup()
2235 sdlAttributePtr *attr; in schema_type_fixup() local
2274 while (zend_hash_get_current_data(type->attributes,(void**)&attr) == SUCCESS) { in schema_type_fixup()
2276 schema_attribute_fixup(ctx,*attr); in schema_type_fixup()
2281 schema_attributegroup_fixup(ctx,*attr,type->attributes); in schema_type_fixup()
2292 sdlAttributePtr *attr; in schema_pass2() local
2297 while (zend_hash_get_current_data(ctx->attributes,(void**)&attr) == SUCCESS) { in schema_pass2()
2298 schema_attribute_fixup(ctx,*attr); in schema_pass2()
2481 sdlExtraAttributePtr attr = *((sdlExtraAttributePtr*)attribute); in delete_extra_attribute() local
2483 if (attr->ns) { in delete_extra_attribute()
2484 efree(attr->ns); in delete_extra_attribute()
2486 if (attr->val) { in delete_extra_attribute()
2487 efree(attr->val); in delete_extra_attribute()
2489 efree(attr); in delete_extra_attribute()
2494 sdlExtraAttributePtr attr = *((sdlExtraAttributePtr*)attribute); in delete_extra_attribute_persistent() local
2496 if (attr->ns) { in delete_extra_attribute_persistent()
2497 free(attr->ns); in delete_extra_attribute_persistent()
2499 if (attr->val) { in delete_extra_attribute_persistent()
2500 free(attr->val); in delete_extra_attribute_persistent()
2502 free(attr); in delete_extra_attribute_persistent()
2507 sdlAttributePtr attr = *((sdlAttributePtr*)attribute); in delete_attribute() local
2509 if (attr->def) { in delete_attribute()
2510 efree(attr->def); in delete_attribute()
2512 if (attr->fixed) { in delete_attribute()
2513 efree(attr->fixed); in delete_attribute()
2515 if (attr->name) { in delete_attribute()
2516 efree(attr->name); in delete_attribute()
2518 if (attr->namens) { in delete_attribute()
2519 efree(attr->namens); in delete_attribute()
2521 if (attr->ref) { in delete_attribute()
2522 efree(attr->ref); in delete_attribute()
2524 if (attr->extraAttributes) { in delete_attribute()
2525 zend_hash_destroy(attr->extraAttributes); in delete_attribute()
2526 efree(attr->extraAttributes); in delete_attribute()
2528 efree(attr); in delete_attribute()
2533 sdlAttributePtr attr = *((sdlAttributePtr*)attribute); in delete_attribute_persistent() local
2535 if (attr->def) { in delete_attribute_persistent()
2536 free(attr->def); in delete_attribute_persistent()
2538 if (attr->fixed) { in delete_attribute_persistent()
2539 free(attr->fixed); in delete_attribute_persistent()
2541 if (attr->name) { in delete_attribute_persistent()
2542 free(attr->name); in delete_attribute_persistent()
2544 if (attr->namens) { in delete_attribute_persistent()
2545 free(attr->namens); in delete_attribute_persistent()
2547 if (attr->ref) { in delete_attribute_persistent()
2548 free(attr->ref); in delete_attribute_persistent()
2550 if (attr->extraAttributes) { in delete_attribute_persistent()
2551 zend_hash_destroy(attr->extraAttributes); in delete_attribute_persistent()
2552 free(attr->extraAttributes); in delete_attribute_persistent()
2554 free(attr); in delete_attribute_persistent()