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()
1481 xmlAttrPtr attrs, attr, ns, name, type, ref = NULL; in schema_element() local
1574 attr = get_attribute(attrs, "nillable"); in schema_element()
1575 if (attr) { in schema_element()
1579 if (!stricmp((char*)attr->children->content, "true") || in schema_element()
1580 !stricmp((char*)attr->children->content, "1")) { in schema_element()
1589 attr = get_attribute(attrs, "fixed"); in schema_element()
1590 if (attr) { in schema_element()
1594 cur_type->fixed = estrdup((char*)attr->children->content); in schema_element()
1597 attr = get_attribute(attrs, "default"); in schema_element()
1598 if (attr) { in schema_element()
1604 cur_type->def = estrdup((char*)attr->children->content); in schema_element()
1608 attr = get_attribute(attrs, "form"); in schema_element()
1609 if (attr) { in schema_element()
1610 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_element()
1612 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_element()
1715 xmlAttrPtr attr, name, ref = NULL, type = NULL; in schema_attribute() local
1797 attr = attrType->properties; in schema_attribute()
1798 while (attr != NULL) { in schema_attribute()
1799 if (attr_is_equal_ex(attr, "default", SCHEMA_NAMESPACE)) { in schema_attribute()
1800 newAttr->def = estrdup((char*)attr->children->content); in schema_attribute()
1801 } else if (attr_is_equal_ex(attr, "fixed", SCHEMA_NAMESPACE)) { in schema_attribute()
1802 newAttr->fixed = estrdup((char*)attr->children->content); in schema_attribute()
1803 } else if (attr_is_equal_ex(attr, "form", SCHEMA_NAMESPACE)) { in schema_attribute()
1804 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_attribute()
1806 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_attribute()
1811 } else if (attr_is_equal_ex(attr, "id", SCHEMA_NAMESPACE)) { in schema_attribute()
1813 } else if (attr_is_equal_ex(attr, "name", SCHEMA_NAMESPACE)) { in schema_attribute()
1814 newAttr->name = estrdup((char*)attr->children->content); in schema_attribute()
1815 } else if (attr_is_equal_ex(attr, "ref", SCHEMA_NAMESPACE)) { in schema_attribute()
1817 } else if (attr_is_equal_ex(attr, "type", SCHEMA_NAMESPACE)) { in schema_attribute()
1819 } else if (attr_is_equal_ex(attr, "use", SCHEMA_NAMESPACE)) { in schema_attribute()
1820 if (strncmp((char*)attr->children->content, "prohibited", sizeof("prohibited")) == 0) { in schema_attribute()
1822 } else if (strncmp((char*)attr->children->content, "required", sizeof("required")) == 0) { in schema_attribute()
1824 } else if (strncmp((char*)attr->children->content, "optional", sizeof("optional")) == 0) { in schema_attribute()
1830 xmlNsPtr nsPtr = attr_find_ns(attr); in schema_attribute()
1840 parse_namespace(attr->children->content, &value, &ns); in schema_attribute()
1841 nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns)); in schema_attribute()
1846 ext->val = estrdup((char*)attr->children->content); in schema_attribute()
1858 smart_str_appends(&key2, (char*)attr->name); in schema_attribute()
1864 attr = attr->next; in schema_attribute()
2025 sdlExtraAttributePtr *attr = (sdlExtraAttributePtr*)attribute; in copy_extra_attribute() local
2029 memcpy(new_attr, *attr, sizeof(sdlExtraAttribute)); in copy_extra_attribute()
2030 *attr = new_attr; in copy_extra_attribute()
2039 static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr) in schema_attribute_fixup() argument
2043 if (attr->ref != NULL) { in schema_attribute_fixup()
2045 if (zend_hash_find(ctx->attributes, attr->ref, strlen(attr->ref)+1, (void**)&tmp) == SUCCESS) { in schema_attribute_fixup()
2047 if ((*tmp)->name != NULL && attr->name == NULL) { in schema_attribute_fixup()
2048 attr->name = estrdup((*tmp)->name); in schema_attribute_fixup()
2050 if ((*tmp)->namens != NULL && attr->namens == NULL) { in schema_attribute_fixup()
2051 attr->namens = estrdup((*tmp)->namens); in schema_attribute_fixup()
2053 if ((*tmp)->def != NULL && attr->def == NULL) { in schema_attribute_fixup()
2054 attr->def = estrdup((*tmp)->def); in schema_attribute_fixup()
2056 if ((*tmp)->fixed != NULL && attr->fixed == NULL) { in schema_attribute_fixup()
2057 attr->fixed = estrdup((*tmp)->fixed); in schema_attribute_fixup()
2059 if (attr->form == XSD_FORM_DEFAULT) { in schema_attribute_fixup()
2060 attr->form = (*tmp)->form; in schema_attribute_fixup()
2062 if (attr->use == XSD_USE_DEFAULT) { in schema_attribute_fixup()
2063 attr->use = (*tmp)->use; in schema_attribute_fixup()
2068 attr->extraAttributes = emalloc(sizeof(HashTable)); in schema_attribute_fixup()
2069 …zend_hash_init(attr->extraAttributes, zend_hash_num_elements((*tmp)->extraAttributes), NULL, delet… in schema_attribute_fixup()
2070 …zend_hash_copy(attr->extraAttributes, (*tmp)->extraAttributes, copy_extra_attribute, &node, sizeof… in schema_attribute_fixup()
2072 attr->encode = (*tmp)->encode; in schema_attribute_fixup()
2075 if (attr->name == NULL && attr->ref != NULL) { in schema_attribute_fixup()
2076 char *name = strrchr(attr->ref, ':'); in schema_attribute_fixup()
2078 attr->name = estrdup(name+1); in schema_attribute_fixup()
2080 attr->name = estrdup(attr->ref); in schema_attribute_fixup()
2083 efree(attr->ref); in schema_attribute_fixup()
2084 attr->ref = NULL; in schema_attribute_fixup()
2088 static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashTable *ht) in schema_attributegroup_fixup() argument
2093 if (attr->ref != NULL) { in schema_attributegroup_fixup()
2095 …if (zend_hash_find(ctx->attributeGroups, attr->ref, strlen(attr->ref)+1, (void**)&tmp) == SUCCESS)… in schema_attributegroup_fixup()
2135 efree(attr->ref); in schema_attributegroup_fixup()
2136 attr->ref = NULL; in schema_attributegroup_fixup()
2192 sdlAttributePtr *attr; in schema_type_fixup() local
2230 while (zend_hash_get_current_data(type->attributes,(void**)&attr) == SUCCESS) { in schema_type_fixup()
2232 schema_attribute_fixup(ctx,*attr); in schema_type_fixup()
2237 schema_attributegroup_fixup(ctx,*attr,type->attributes); in schema_type_fixup()
2248 sdlAttributePtr *attr; in schema_pass2() local
2253 while (zend_hash_get_current_data(ctx->attributes,(void**)&attr) == SUCCESS) { in schema_pass2()
2254 schema_attribute_fixup(ctx,*attr); in schema_pass2()
2437 sdlExtraAttributePtr attr = *((sdlExtraAttributePtr*)attribute); in delete_extra_attribute() local
2439 if (attr->ns) { in delete_extra_attribute()
2440 efree(attr->ns); in delete_extra_attribute()
2442 if (attr->val) { in delete_extra_attribute()
2443 efree(attr->val); in delete_extra_attribute()
2445 efree(attr); in delete_extra_attribute()
2450 sdlExtraAttributePtr attr = *((sdlExtraAttributePtr*)attribute); in delete_extra_attribute_persistent() local
2452 if (attr->ns) { in delete_extra_attribute_persistent()
2453 free(attr->ns); in delete_extra_attribute_persistent()
2455 if (attr->val) { in delete_extra_attribute_persistent()
2456 free(attr->val); in delete_extra_attribute_persistent()
2458 free(attr); in delete_extra_attribute_persistent()
2463 sdlAttributePtr attr = *((sdlAttributePtr*)attribute); in delete_attribute() local
2465 if (attr->def) { in delete_attribute()
2466 efree(attr->def); in delete_attribute()
2468 if (attr->fixed) { in delete_attribute()
2469 efree(attr->fixed); in delete_attribute()
2471 if (attr->name) { in delete_attribute()
2472 efree(attr->name); in delete_attribute()
2474 if (attr->namens) { in delete_attribute()
2475 efree(attr->namens); in delete_attribute()
2477 if (attr->ref) { in delete_attribute()
2478 efree(attr->ref); in delete_attribute()
2480 if (attr->extraAttributes) { in delete_attribute()
2481 zend_hash_destroy(attr->extraAttributes); in delete_attribute()
2482 efree(attr->extraAttributes); in delete_attribute()
2484 efree(attr); in delete_attribute()
2489 sdlAttributePtr attr = *((sdlAttributePtr*)attribute); in delete_attribute_persistent() local
2491 if (attr->def) { in delete_attribute_persistent()
2492 free(attr->def); in delete_attribute_persistent()
2494 if (attr->fixed) { in delete_attribute_persistent()
2495 free(attr->fixed); in delete_attribute_persistent()
2497 if (attr->name) { in delete_attribute_persistent()
2498 free(attr->name); in delete_attribute_persistent()
2500 if (attr->namens) { in delete_attribute_persistent()
2501 free(attr->namens); in delete_attribute_persistent()
2503 if (attr->ref) { in delete_attribute_persistent()
2504 free(attr->ref); in delete_attribute_persistent()
2506 if (attr->extraAttributes) { in delete_attribute_persistent()
2507 zend_hash_destroy(attr->extraAttributes); in delete_attribute_persistent()
2508 free(attr->extraAttributes); in delete_attribute_persistent()
2510 free(attr); in delete_attribute_persistent()