Lines Matching refs:attr
986 xmlAttrPtr attr = get_attribute(node->properties, "minOccurs"); in schema_min_max() local
988 if (attr) { in schema_min_max()
989 model->min_occurs = atoi((char*)attr->children->content); in schema_min_max()
994 attr = get_attribute(node->properties, "maxOccurs"); in schema_min_max()
995 if (attr) { in schema_min_max()
996 if (!strncmp((char*)attr->children->content, "unbounded", sizeof("unbounded"))) { in schema_min_max()
999 model->max_occurs = atoi((char*)attr->children->content); in schema_min_max()
1491 xmlAttrPtr attrs, attr, ns, name, type, ref = NULL; in schema_element() local
1592 attr = get_attribute(attrs, "nillable"); in schema_element()
1593 if (attr) { in schema_element()
1597 if (!stricmp((char*)attr->children->content, "true") || in schema_element()
1598 !stricmp((char*)attr->children->content, "1")) { in schema_element()
1607 attr = get_attribute(attrs, "fixed"); in schema_element()
1608 if (attr) { in schema_element()
1612 cur_type->fixed = estrdup((char*)attr->children->content); in schema_element()
1615 attr = get_attribute(attrs, "default"); in schema_element()
1616 if (attr) { in schema_element()
1622 cur_type->def = estrdup((char*)attr->children->content); in schema_element()
1626 attr = get_attribute(attrs, "form"); in schema_element()
1627 if (attr) { in schema_element()
1628 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_element()
1630 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_element()
1733 xmlAttrPtr attr, name, ref = NULL, type = NULL; in schema_attribute() local
1823 attr = attrType->properties; in schema_attribute()
1824 while (attr != NULL) { in schema_attribute()
1825 if (attr_is_equal_ex(attr, "default", SCHEMA_NAMESPACE)) { in schema_attribute()
1826 newAttr->def = estrdup((char*)attr->children->content); in schema_attribute()
1827 } else if (attr_is_equal_ex(attr, "fixed", SCHEMA_NAMESPACE)) { in schema_attribute()
1828 newAttr->fixed = estrdup((char*)attr->children->content); in schema_attribute()
1829 } else if (attr_is_equal_ex(attr, "form", SCHEMA_NAMESPACE)) { in schema_attribute()
1830 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_attribute()
1832 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_attribute()
1837 } else if (attr_is_equal_ex(attr, "id", SCHEMA_NAMESPACE)) { in schema_attribute()
1839 } else if (attr_is_equal_ex(attr, "name", SCHEMA_NAMESPACE)) { in schema_attribute()
1840 newAttr->name = estrdup((char*)attr->children->content); in schema_attribute()
1841 } else if (attr_is_equal_ex(attr, "ref", SCHEMA_NAMESPACE)) { in schema_attribute()
1843 } else if (attr_is_equal_ex(attr, "type", SCHEMA_NAMESPACE)) { in schema_attribute()
1845 } else if (attr_is_equal_ex(attr, "use", SCHEMA_NAMESPACE)) { in schema_attribute()
1846 if (strncmp((char*)attr->children->content, "prohibited", sizeof("prohibited")) == 0) { in schema_attribute()
1848 } else if (strncmp((char*)attr->children->content, "required", sizeof("required")) == 0) { in schema_attribute()
1850 } else if (strncmp((char*)attr->children->content, "optional", sizeof("optional")) == 0) { in schema_attribute()
1856 xmlNsPtr nsPtr = attr_find_ns(attr); in schema_attribute()
1866 parse_namespace(attr->children->content, &value, &ns); in schema_attribute()
1867 nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns)); in schema_attribute()
1872 ext->val = estrdup((char*)attr->children->content); in schema_attribute()
1884 smart_str_appends(&key2, (char*)attr->name); in schema_attribute()
1890 attr = attr->next; in schema_attribute()
2085 static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr) in schema_attribute_fixup() argument
2089 if (attr->ref != NULL) { in schema_attribute_fixup()
2091 tmp = (sdlAttributePtr)schema_find_by_ref(ctx->attributes, attr->ref); in schema_attribute_fixup()
2094 if (tmp->name != NULL && attr->name == NULL) { in schema_attribute_fixup()
2095 attr->name = estrdup(tmp->name); in schema_attribute_fixup()
2097 if (tmp->namens != NULL && attr->namens == NULL) { in schema_attribute_fixup()
2098 attr->namens = estrdup(tmp->namens); in schema_attribute_fixup()
2100 if (tmp->def != NULL && attr->def == NULL) { in schema_attribute_fixup()
2101 attr->def = estrdup(tmp->def); in schema_attribute_fixup()
2103 if (tmp->fixed != NULL && attr->fixed == NULL) { in schema_attribute_fixup()
2104 attr->fixed = estrdup(tmp->fixed); in schema_attribute_fixup()
2106 if (attr->form == XSD_FORM_DEFAULT) { in schema_attribute_fixup()
2107 attr->form = tmp->form; in schema_attribute_fixup()
2109 if (attr->use == XSD_USE_DEFAULT) { in schema_attribute_fixup()
2110 attr->use = tmp->use; in schema_attribute_fixup()
2113 attr->extraAttributes = emalloc(sizeof(HashTable)); in schema_attribute_fixup()
2114 …zend_hash_init(attr->extraAttributes, zend_hash_num_elements(tmp->extraAttributes), NULL, delete_e… in schema_attribute_fixup()
2115 zend_hash_copy(attr->extraAttributes, tmp->extraAttributes, copy_extra_attribute); in schema_attribute_fixup()
2117 attr->encode = tmp->encode; in schema_attribute_fixup()
2120 if (attr->name == NULL && attr->ref != NULL) { in schema_attribute_fixup()
2121 char *name = strrchr(attr->ref, ':'); in schema_attribute_fixup()
2123 attr->name = estrdup(name+1); in schema_attribute_fixup()
2125 attr->name = estrdup(attr->ref); in schema_attribute_fixup()
2128 efree(attr->ref); in schema_attribute_fixup()
2129 attr->ref = NULL; in schema_attribute_fixup()
2133 static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashTable *ht) in schema_attributegroup_fixup() argument
2138 if (attr->ref != NULL) { in schema_attributegroup_fixup()
2140 tmp = (sdlTypePtr)schema_find_by_ref(ctx->attributeGroups, attr->ref); in schema_attributegroup_fixup()
2179 efree(attr->ref); in schema_attributegroup_fixup()
2180 attr->ref = NULL; in schema_attributegroup_fixup()
2231 sdlAttributePtr attr; in schema_type_fixup() local
2270 ZEND_HASH_FOREACH_KEY_PTR(type->attributes, index, str_key, attr) { in schema_type_fixup()
2272 schema_attribute_fixup(ctx, attr); in schema_type_fixup()
2274 schema_attributegroup_fixup(ctx, attr, type->attributes); in schema_type_fixup()
2284 sdlAttributePtr attr; in schema_pass2() local
2288 ZEND_HASH_FOREACH_PTR(ctx->attributes, attr) { in schema_pass2()
2289 schema_attribute_fixup(ctx, attr); in schema_pass2()
2469 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute() local
2471 if (attr->ns) { in delete_extra_attribute()
2472 efree(attr->ns); in delete_extra_attribute()
2474 if (attr->val) { in delete_extra_attribute()
2475 efree(attr->val); in delete_extra_attribute()
2477 efree(attr); in delete_extra_attribute()
2482 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute_persistent() local
2484 if (attr->ns) { in delete_extra_attribute_persistent()
2485 free(attr->ns); in delete_extra_attribute_persistent()
2487 if (attr->val) { in delete_extra_attribute_persistent()
2488 free(attr->val); in delete_extra_attribute_persistent()
2490 free(attr); in delete_extra_attribute_persistent()
2495 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute() local
2497 if (attr->def) { in delete_attribute()
2498 efree(attr->def); in delete_attribute()
2500 if (attr->fixed) { in delete_attribute()
2501 efree(attr->fixed); in delete_attribute()
2503 if (attr->name) { in delete_attribute()
2504 efree(attr->name); in delete_attribute()
2506 if (attr->namens) { in delete_attribute()
2507 efree(attr->namens); in delete_attribute()
2509 if (attr->ref) { in delete_attribute()
2510 efree(attr->ref); in delete_attribute()
2512 if (attr->extraAttributes) { in delete_attribute()
2513 zend_hash_destroy(attr->extraAttributes); in delete_attribute()
2514 efree(attr->extraAttributes); in delete_attribute()
2516 efree(attr); in delete_attribute()
2521 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute_persistent() local
2523 if (attr->def) { in delete_attribute_persistent()
2524 free(attr->def); in delete_attribute_persistent()
2526 if (attr->fixed) { in delete_attribute_persistent()
2527 free(attr->fixed); in delete_attribute_persistent()
2529 if (attr->name) { in delete_attribute_persistent()
2530 free(attr->name); in delete_attribute_persistent()
2532 if (attr->namens) { in delete_attribute_persistent()
2533 free(attr->namens); in delete_attribute_persistent()
2535 if (attr->ref) { in delete_attribute_persistent()
2536 free(attr->ref); in delete_attribute_persistent()
2538 if (attr->extraAttributes) { in delete_attribute_persistent()
2539 zend_hash_destroy(attr->extraAttributes); in delete_attribute_persistent()
2540 free(attr->extraAttributes); in delete_attribute_persistent()
2542 free(attr); in delete_attribute_persistent()