Lines Matching refs:attr

985 	xmlAttrPtr attr = get_attribute(node->properties, "minOccurs");  in schema_min_max()  local
987 if (attr) { in schema_min_max()
988 model->min_occurs = atoi((char*)attr->children->content); in schema_min_max()
993 attr = get_attribute(node->properties, "maxOccurs"); in schema_min_max()
994 if (attr) { in schema_min_max()
995 if (!strncmp((char*)attr->children->content, "unbounded", sizeof("unbounded"))) { in schema_min_max()
998 model->max_occurs = atoi((char*)attr->children->content); in schema_min_max()
1490 xmlAttrPtr attrs, attr, ns, name, type, ref = NULL; in schema_element() local
1591 attr = get_attribute(attrs, "nillable"); in schema_element()
1592 if (attr) { in schema_element()
1596 if (!stricmp((char*)attr->children->content, "true") || in schema_element()
1597 !stricmp((char*)attr->children->content, "1")) { in schema_element()
1606 attr = get_attribute(attrs, "fixed"); in schema_element()
1607 if (attr) { in schema_element()
1611 cur_type->fixed = estrdup((char*)attr->children->content); in schema_element()
1614 attr = get_attribute(attrs, "default"); in schema_element()
1615 if (attr) { in schema_element()
1619 cur_type->def = estrdup((char*)attr->children->content); in schema_element()
1623 attr = get_attribute(attrs, "form"); in schema_element()
1624 if (attr) { in schema_element()
1625 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_element()
1627 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_element()
1730 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()
2083 static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr) in schema_attribute_fixup() argument
2087 if (attr->ref != NULL) { in schema_attribute_fixup()
2089 tmp = (sdlAttributePtr)schema_find_by_ref(ctx->attributes, attr->ref); in schema_attribute_fixup()
2092 if (tmp->name != NULL && attr->name == NULL) { in schema_attribute_fixup()
2093 attr->name = estrdup(tmp->name); in schema_attribute_fixup()
2095 if (tmp->namens != NULL && attr->namens == NULL) { in schema_attribute_fixup()
2096 attr->namens = estrdup(tmp->namens); in schema_attribute_fixup()
2098 if (tmp->def != NULL && attr->def == NULL) { in schema_attribute_fixup()
2099 attr->def = estrdup(tmp->def); in schema_attribute_fixup()
2101 if (tmp->fixed != NULL && attr->fixed == NULL) { in schema_attribute_fixup()
2102 attr->fixed = estrdup(tmp->fixed); in schema_attribute_fixup()
2104 if (attr->form == XSD_FORM_DEFAULT) { in schema_attribute_fixup()
2105 attr->form = tmp->form; in schema_attribute_fixup()
2107 if (attr->use == XSD_USE_DEFAULT) { in schema_attribute_fixup()
2108 attr->use = tmp->use; in schema_attribute_fixup()
2111 attr->extraAttributes = emalloc(sizeof(HashTable)); in schema_attribute_fixup()
2112 …zend_hash_init(attr->extraAttributes, zend_hash_num_elements(tmp->extraAttributes), NULL, delete_e… in schema_attribute_fixup()
2113 zend_hash_copy(attr->extraAttributes, tmp->extraAttributes, copy_extra_attribute); in schema_attribute_fixup()
2115 attr->encode = tmp->encode; in schema_attribute_fixup()
2118 if (attr->name == NULL && attr->ref != NULL) { in schema_attribute_fixup()
2119 char *name = strrchr(attr->ref, ':'); in schema_attribute_fixup()
2121 attr->name = estrdup(name+1); in schema_attribute_fixup()
2123 attr->name = estrdup(attr->ref); in schema_attribute_fixup()
2126 efree(attr->ref); in schema_attribute_fixup()
2127 attr->ref = NULL; in schema_attribute_fixup()
2131 static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashTable *ht) in schema_attributegroup_fixup() argument
2136 if (attr->ref != NULL) { in schema_attributegroup_fixup()
2138 tmp = (sdlTypePtr)schema_find_by_ref(ctx->attributeGroups, attr->ref); in schema_attributegroup_fixup()
2177 efree(attr->ref); in schema_attributegroup_fixup()
2178 attr->ref = NULL; in schema_attributegroup_fixup()
2229 sdlAttributePtr attr; in schema_type_fixup() local
2268 ZEND_HASH_FOREACH_KEY_PTR(type->attributes, index, str_key, attr) { in schema_type_fixup()
2270 schema_attribute_fixup(ctx, attr); in schema_type_fixup()
2272 schema_attributegroup_fixup(ctx, attr, type->attributes); in schema_type_fixup()
2282 sdlAttributePtr attr; in schema_pass2() local
2286 ZEND_HASH_FOREACH_PTR(ctx->attributes, attr) { in schema_pass2()
2287 schema_attribute_fixup(ctx, attr); in schema_pass2()
2467 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute() local
2469 if (attr->ns) { in delete_extra_attribute()
2470 efree(attr->ns); in delete_extra_attribute()
2472 if (attr->val) { in delete_extra_attribute()
2473 efree(attr->val); in delete_extra_attribute()
2475 efree(attr); in delete_extra_attribute()
2480 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute_persistent() local
2482 if (attr->ns) { in delete_extra_attribute_persistent()
2483 free(attr->ns); in delete_extra_attribute_persistent()
2485 if (attr->val) { in delete_extra_attribute_persistent()
2486 free(attr->val); in delete_extra_attribute_persistent()
2488 free(attr); in delete_extra_attribute_persistent()
2493 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute() local
2495 if (attr->def) { in delete_attribute()
2496 efree(attr->def); in delete_attribute()
2498 if (attr->fixed) { in delete_attribute()
2499 efree(attr->fixed); in delete_attribute()
2501 if (attr->name) { in delete_attribute()
2502 efree(attr->name); in delete_attribute()
2504 if (attr->namens) { in delete_attribute()
2505 efree(attr->namens); in delete_attribute()
2507 if (attr->ref) { in delete_attribute()
2508 efree(attr->ref); in delete_attribute()
2510 if (attr->extraAttributes) { in delete_attribute()
2511 zend_hash_destroy(attr->extraAttributes); in delete_attribute()
2512 efree(attr->extraAttributes); in delete_attribute()
2514 efree(attr); in delete_attribute()
2519 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute_persistent() local
2521 if (attr->def) { in delete_attribute_persistent()
2522 free(attr->def); in delete_attribute_persistent()
2524 if (attr->fixed) { in delete_attribute_persistent()
2525 free(attr->fixed); in delete_attribute_persistent()
2527 if (attr->name) { in delete_attribute_persistent()
2528 free(attr->name); in delete_attribute_persistent()
2530 if (attr->namens) { in delete_attribute_persistent()
2531 free(attr->namens); in delete_attribute_persistent()
2533 if (attr->ref) { in delete_attribute_persistent()
2534 free(attr->ref); in delete_attribute_persistent()
2536 if (attr->extraAttributes) { in delete_attribute_persistent()
2537 zend_hash_destroy(attr->extraAttributes); in delete_attribute_persistent()
2538 free(attr->extraAttributes); in delete_attribute_persistent()
2540 free(attr); in delete_attribute_persistent()