Lines Matching refs:attr

983 	xmlAttrPtr attr = get_attribute(node->properties, "minOccurs");  in schema_min_max()  local
985 if (attr) { in schema_min_max()
986 model->min_occurs = atoi((char*)attr->children->content); in schema_min_max()
991 attr = get_attribute(node->properties, "maxOccurs"); in schema_min_max()
992 if (attr) { in schema_min_max()
993 if (!strncmp((char*)attr->children->content, "unbounded", sizeof("unbounded"))) { in schema_min_max()
996 model->max_occurs = atoi((char*)attr->children->content); in schema_min_max()
1488 xmlAttrPtr attrs, attr, ns, name, type, ref = NULL; in schema_element() local
1589 attr = get_attribute(attrs, "nillable"); in schema_element()
1590 if (attr) { in schema_element()
1594 if (!stricmp((char*)attr->children->content, "true") || in schema_element()
1595 !stricmp((char*)attr->children->content, "1")) { in schema_element()
1604 attr = get_attribute(attrs, "fixed"); in schema_element()
1605 if (attr) { in schema_element()
1609 cur_type->fixed = estrdup((char*)attr->children->content); in schema_element()
1612 attr = get_attribute(attrs, "default"); in schema_element()
1613 if (attr) { in schema_element()
1617 cur_type->def = estrdup((char*)attr->children->content); in schema_element()
1621 attr = get_attribute(attrs, "form"); in schema_element()
1622 if (attr) { in schema_element()
1623 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_element()
1625 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_element()
1728 xmlAttrPtr attr, name, ref = NULL, type = NULL; in schema_attribute() local
1819 attr = attrType->properties; in schema_attribute()
1820 while (attr != NULL) { in schema_attribute()
1821 if (attr_is_equal_ex(attr, "default", SCHEMA_NAMESPACE)) { in schema_attribute()
1822 newAttr->def = estrdup((char*)attr->children->content); in schema_attribute()
1823 } else if (attr_is_equal_ex(attr, "fixed", SCHEMA_NAMESPACE)) { in schema_attribute()
1824 newAttr->fixed = estrdup((char*)attr->children->content); in schema_attribute()
1825 } else if (attr_is_equal_ex(attr, "form", SCHEMA_NAMESPACE)) { in schema_attribute()
1826 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_attribute()
1828 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_attribute()
1833 } else if (attr_is_equal_ex(attr, "id", SCHEMA_NAMESPACE)) { in schema_attribute()
1835 } else if (attr_is_equal_ex(attr, "name", SCHEMA_NAMESPACE)) { in schema_attribute()
1836 newAttr->name = estrdup((char*)attr->children->content); in schema_attribute()
1837 } else if (attr_is_equal_ex(attr, "ref", SCHEMA_NAMESPACE)) { in schema_attribute()
1839 } else if (attr_is_equal_ex(attr, "type", SCHEMA_NAMESPACE)) { in schema_attribute()
1841 } else if (attr_is_equal_ex(attr, "use", SCHEMA_NAMESPACE)) { in schema_attribute()
1842 if (strncmp((char*)attr->children->content, "prohibited", sizeof("prohibited")) == 0) { in schema_attribute()
1844 } else if (strncmp((char*)attr->children->content, "required", sizeof("required")) == 0) { in schema_attribute()
1846 } else if (strncmp((char*)attr->children->content, "optional", sizeof("optional")) == 0) { in schema_attribute()
1852 xmlNsPtr nsPtr = attr_find_ns(attr); in schema_attribute()
1862 parse_namespace(attr->children->content, &value, &ns); in schema_attribute()
1863 nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns)); in schema_attribute()
1868 ext->val = estrdup((char*)attr->children->content); in schema_attribute()
1880 smart_str_appends(&key2, (char*)attr->name); in schema_attribute()
1886 attr = attr->next; in schema_attribute()
2081 static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr) in schema_attribute_fixup() argument
2085 if (attr->ref != NULL) { in schema_attribute_fixup()
2087 tmp = (sdlAttributePtr)schema_find_by_ref(ctx->attributes, attr->ref); in schema_attribute_fixup()
2090 if (tmp->name != NULL && attr->name == NULL) { in schema_attribute_fixup()
2091 attr->name = estrdup(tmp->name); in schema_attribute_fixup()
2093 if (tmp->namens != NULL && attr->namens == NULL) { in schema_attribute_fixup()
2094 attr->namens = estrdup(tmp->namens); in schema_attribute_fixup()
2096 if (tmp->def != NULL && attr->def == NULL) { in schema_attribute_fixup()
2097 attr->def = estrdup(tmp->def); in schema_attribute_fixup()
2099 if (tmp->fixed != NULL && attr->fixed == NULL) { in schema_attribute_fixup()
2100 attr->fixed = estrdup(tmp->fixed); in schema_attribute_fixup()
2102 if (attr->form == XSD_FORM_DEFAULT) { in schema_attribute_fixup()
2103 attr->form = tmp->form; in schema_attribute_fixup()
2105 if (attr->use == XSD_USE_DEFAULT) { in schema_attribute_fixup()
2106 attr->use = tmp->use; in schema_attribute_fixup()
2109 attr->extraAttributes = emalloc(sizeof(HashTable)); in schema_attribute_fixup()
2110 …zend_hash_init(attr->extraAttributes, zend_hash_num_elements(tmp->extraAttributes), NULL, delete_e… in schema_attribute_fixup()
2111 zend_hash_copy(attr->extraAttributes, tmp->extraAttributes, copy_extra_attribute); in schema_attribute_fixup()
2113 attr->encode = tmp->encode; in schema_attribute_fixup()
2116 if (attr->name == NULL && attr->ref != NULL) { in schema_attribute_fixup()
2117 char *name = strrchr(attr->ref, ':'); in schema_attribute_fixup()
2119 attr->name = estrdup(name+1); in schema_attribute_fixup()
2121 attr->name = estrdup(attr->ref); in schema_attribute_fixup()
2124 efree(attr->ref); in schema_attribute_fixup()
2125 attr->ref = NULL; in schema_attribute_fixup()
2129 static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashTable *ht) in schema_attributegroup_fixup() argument
2134 if (attr->ref != NULL) { in schema_attributegroup_fixup()
2136 tmp = (sdlTypePtr)schema_find_by_ref(ctx->attributeGroups, attr->ref); in schema_attributegroup_fixup()
2175 efree(attr->ref); in schema_attributegroup_fixup()
2176 attr->ref = NULL; in schema_attributegroup_fixup()
2227 sdlAttributePtr attr; in schema_type_fixup() local
2266 ZEND_HASH_FOREACH_KEY_PTR(type->attributes, index, str_key, attr) { in schema_type_fixup()
2268 schema_attribute_fixup(ctx, attr); in schema_type_fixup()
2270 schema_attributegroup_fixup(ctx, attr, type->attributes); in schema_type_fixup()
2280 sdlAttributePtr attr; in schema_pass2() local
2284 ZEND_HASH_FOREACH_PTR(ctx->attributes, attr) { in schema_pass2()
2285 schema_attribute_fixup(ctx, attr); in schema_pass2()
2465 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute() local
2467 if (attr->ns) { in delete_extra_attribute()
2468 efree(attr->ns); in delete_extra_attribute()
2470 if (attr->val) { in delete_extra_attribute()
2471 efree(attr->val); in delete_extra_attribute()
2473 efree(attr); in delete_extra_attribute()
2478 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute_persistent() local
2480 if (attr->ns) { in delete_extra_attribute_persistent()
2481 free(attr->ns); in delete_extra_attribute_persistent()
2483 if (attr->val) { in delete_extra_attribute_persistent()
2484 free(attr->val); in delete_extra_attribute_persistent()
2486 free(attr); in delete_extra_attribute_persistent()
2491 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute() local
2493 if (attr->def) { in delete_attribute()
2494 efree(attr->def); in delete_attribute()
2496 if (attr->fixed) { in delete_attribute()
2497 efree(attr->fixed); in delete_attribute()
2499 if (attr->name) { in delete_attribute()
2500 efree(attr->name); in delete_attribute()
2502 if (attr->namens) { in delete_attribute()
2503 efree(attr->namens); in delete_attribute()
2505 if (attr->ref) { in delete_attribute()
2506 efree(attr->ref); in delete_attribute()
2508 if (attr->extraAttributes) { in delete_attribute()
2509 zend_hash_destroy(attr->extraAttributes); in delete_attribute()
2510 efree(attr->extraAttributes); in delete_attribute()
2512 efree(attr); in delete_attribute()
2517 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute_persistent() local
2519 if (attr->def) { in delete_attribute_persistent()
2520 free(attr->def); in delete_attribute_persistent()
2522 if (attr->fixed) { in delete_attribute_persistent()
2523 free(attr->fixed); in delete_attribute_persistent()
2525 if (attr->name) { in delete_attribute_persistent()
2526 free(attr->name); in delete_attribute_persistent()
2528 if (attr->namens) { in delete_attribute_persistent()
2529 free(attr->namens); in delete_attribute_persistent()
2531 if (attr->ref) { in delete_attribute_persistent()
2532 free(attr->ref); in delete_attribute_persistent()
2534 if (attr->extraAttributes) { in delete_attribute_persistent()
2535 zend_hash_destroy(attr->extraAttributes); in delete_attribute_persistent()
2536 free(attr->extraAttributes); in delete_attribute_persistent()
2538 free(attr); in delete_attribute_persistent()