Lines Matching refs:attr

1004 	xmlAttrPtr attr = get_attribute(node->properties, "minOccurs");  in schema_min_max()  local
1006 if (attr) { in schema_min_max()
1007 model->min_occurs = atoi((char*)attr->children->content); in schema_min_max()
1012 attr = get_attribute(node->properties, "maxOccurs"); in schema_min_max()
1013 if (attr) { in schema_min_max()
1014 if (!strncmp((char*)attr->children->content, "unbounded", sizeof("unbounded"))) { in schema_min_max()
1017 model->max_occurs = atoi((char*)attr->children->content); in schema_min_max()
1509 xmlAttrPtr attrs, attr, ns, name, type, ref = NULL; in schema_element() local
1610 attr = get_attribute(attrs, "nillable"); in schema_element()
1611 if (attr) { in schema_element()
1615 if (!stricmp((char*)attr->children->content, "true") || in schema_element()
1616 !stricmp((char*)attr->children->content, "1")) { in schema_element()
1625 attr = get_attribute(attrs, "fixed"); in schema_element()
1626 if (attr) { in schema_element()
1630 cur_type->fixed = estrdup((char*)attr->children->content); in schema_element()
1633 attr = get_attribute(attrs, "default"); in schema_element()
1634 if (attr) { in schema_element()
1638 cur_type->def = estrdup((char*)attr->children->content); in schema_element()
1642 attr = get_attribute(attrs, "form"); in schema_element()
1643 if (attr) { in schema_element()
1644 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_element()
1646 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_element()
1749 xmlAttrPtr attr, name, ref = NULL, type = NULL; in schema_attribute() local
1840 attr = attrType->properties; in schema_attribute()
1841 while (attr != NULL) { in schema_attribute()
1842 if (attr_is_equal_ex(attr, "default", SCHEMA_NAMESPACE)) { in schema_attribute()
1843 newAttr->def = estrdup((char*)attr->children->content); in schema_attribute()
1844 } else if (attr_is_equal_ex(attr, "fixed", SCHEMA_NAMESPACE)) { in schema_attribute()
1845 newAttr->fixed = estrdup((char*)attr->children->content); in schema_attribute()
1846 } else if (attr_is_equal_ex(attr, "form", SCHEMA_NAMESPACE)) { in schema_attribute()
1847 if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) { in schema_attribute()
1849 } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) { in schema_attribute()
1854 } else if (attr_is_equal_ex(attr, "id", SCHEMA_NAMESPACE)) { in schema_attribute()
1856 } else if (attr_is_equal_ex(attr, "name", SCHEMA_NAMESPACE)) { in schema_attribute()
1857 newAttr->name = estrdup((char*)attr->children->content); in schema_attribute()
1858 } else if (attr_is_equal_ex(attr, "ref", SCHEMA_NAMESPACE)) { in schema_attribute()
1860 } else if (attr_is_equal_ex(attr, "type", SCHEMA_NAMESPACE)) { in schema_attribute()
1862 } else if (attr_is_equal_ex(attr, "use", SCHEMA_NAMESPACE)) { in schema_attribute()
1863 if (strncmp((char*)attr->children->content, "prohibited", sizeof("prohibited")) == 0) { in schema_attribute()
1865 } else if (strncmp((char*)attr->children->content, "required", sizeof("required")) == 0) { in schema_attribute()
1867 } else if (strncmp((char*)attr->children->content, "optional", sizeof("optional")) == 0) { in schema_attribute()
1873 xmlNsPtr nsPtr = attr_find_ns(attr); in schema_attribute()
1883 parse_namespace(attr->children->content, &value, &ns); in schema_attribute()
1884 nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns)); in schema_attribute()
1889 ext->val = estrdup((char*)attr->children->content); in schema_attribute()
1901 smart_str_appends(&key2, (char*)attr->name); in schema_attribute()
1907 attr = attr->next; in schema_attribute()
2102 static void schema_attribute_fixup(sdlCtx *ctx, sdlAttributePtr attr) in schema_attribute_fixup() argument
2106 if (attr->ref != NULL) { in schema_attribute_fixup()
2108 tmp = (sdlAttributePtr)schema_find_by_ref(ctx->attributes, attr->ref); in schema_attribute_fixup()
2111 if (tmp->name != NULL && attr->name == NULL) { in schema_attribute_fixup()
2112 attr->name = estrdup(tmp->name); in schema_attribute_fixup()
2114 if (tmp->namens != NULL && attr->namens == NULL) { in schema_attribute_fixup()
2115 attr->namens = estrdup(tmp->namens); in schema_attribute_fixup()
2117 if (tmp->def != NULL && attr->def == NULL) { in schema_attribute_fixup()
2118 attr->def = estrdup(tmp->def); in schema_attribute_fixup()
2120 if (tmp->fixed != NULL && attr->fixed == NULL) { in schema_attribute_fixup()
2121 attr->fixed = estrdup(tmp->fixed); in schema_attribute_fixup()
2123 if (attr->form == XSD_FORM_DEFAULT) { in schema_attribute_fixup()
2124 attr->form = tmp->form; in schema_attribute_fixup()
2126 if (attr->use == XSD_USE_DEFAULT) { in schema_attribute_fixup()
2127 attr->use = tmp->use; in schema_attribute_fixup()
2130 attr->extraAttributes = emalloc(sizeof(HashTable)); in schema_attribute_fixup()
2131 …zend_hash_init(attr->extraAttributes, zend_hash_num_elements(tmp->extraAttributes), NULL, delete_e… in schema_attribute_fixup()
2132 zend_hash_copy(attr->extraAttributes, tmp->extraAttributes, copy_extra_attribute); in schema_attribute_fixup()
2134 attr->encode = tmp->encode; in schema_attribute_fixup()
2137 if (attr->name == NULL && attr->ref != NULL) { in schema_attribute_fixup()
2138 char *name = strrchr(attr->ref, ':'); in schema_attribute_fixup()
2140 attr->name = estrdup(name+1); in schema_attribute_fixup()
2142 attr->name = estrdup(attr->ref); in schema_attribute_fixup()
2145 efree(attr->ref); in schema_attribute_fixup()
2146 attr->ref = NULL; in schema_attribute_fixup()
2150 static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashTable *ht) in schema_attributegroup_fixup() argument
2155 if (attr->ref != NULL) { in schema_attributegroup_fixup()
2157 tmp = (sdlTypePtr)schema_find_by_ref(ctx->attributeGroups, attr->ref); in schema_attributegroup_fixup()
2196 efree(attr->ref); in schema_attributegroup_fixup()
2197 attr->ref = NULL; in schema_attributegroup_fixup()
2249 sdlAttributePtr attr; in schema_type_fixup() local
2288 while ((attr = zend_hash_get_current_data_ptr_ex(type->attributes, &pos)) != NULL) { in schema_type_fixup()
2293 schema_attribute_fixup(ctx, attr); in schema_type_fixup()
2297 schema_attributegroup_fixup(ctx, attr, type->attributes); in schema_type_fixup()
2308 sdlAttributePtr attr; in schema_pass2() local
2312 ZEND_HASH_FOREACH_PTR(ctx->attributes, attr) { in schema_pass2()
2313 schema_attribute_fixup(ctx, attr); in schema_pass2()
2493 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute() local
2495 if (attr->ns) { in delete_extra_attribute()
2496 efree(attr->ns); in delete_extra_attribute()
2498 if (attr->val) { in delete_extra_attribute()
2499 efree(attr->val); in delete_extra_attribute()
2501 efree(attr); in delete_extra_attribute()
2506 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute_persistent() local
2508 if (attr->ns) { in delete_extra_attribute_persistent()
2509 free(attr->ns); in delete_extra_attribute_persistent()
2511 if (attr->val) { in delete_extra_attribute_persistent()
2512 free(attr->val); in delete_extra_attribute_persistent()
2514 free(attr); in delete_extra_attribute_persistent()
2519 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute() local
2521 if (attr->def) { in delete_attribute()
2522 efree(attr->def); in delete_attribute()
2524 if (attr->fixed) { in delete_attribute()
2525 efree(attr->fixed); in delete_attribute()
2527 if (attr->name) { in delete_attribute()
2528 efree(attr->name); in delete_attribute()
2530 if (attr->namens) { in delete_attribute()
2531 efree(attr->namens); in delete_attribute()
2533 if (attr->ref) { in delete_attribute()
2534 efree(attr->ref); in delete_attribute()
2536 if (attr->extraAttributes) { in delete_attribute()
2537 zend_hash_destroy(attr->extraAttributes); in delete_attribute()
2538 efree(attr->extraAttributes); in delete_attribute()
2540 efree(attr); in delete_attribute()
2545 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute_persistent() local
2547 if (attr->def) { in delete_attribute_persistent()
2548 free(attr->def); in delete_attribute_persistent()
2550 if (attr->fixed) { in delete_attribute_persistent()
2551 free(attr->fixed); in delete_attribute_persistent()
2553 if (attr->name) { in delete_attribute_persistent()
2554 free(attr->name); in delete_attribute_persistent()
2556 if (attr->namens) { in delete_attribute_persistent()
2557 free(attr->namens); in delete_attribute_persistent()
2559 if (attr->ref) { in delete_attribute_persistent()
2560 free(attr->ref); in delete_attribute_persistent()
2562 if (attr->extraAttributes) { in delete_attribute_persistent()
2563 zend_hash_destroy(attr->extraAttributes); in delete_attribute_persistent()
2564 free(attr->extraAttributes); in delete_attribute_persistent()
2566 free(attr); in delete_attribute_persistent()