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()
2228 sdlAttributePtr attr; in schema_type_fixup() local
2267 while ((attr = zend_hash_get_current_data_ptr_ex(type->attributes, &pos)) != NULL) { in schema_type_fixup()
2272 schema_attribute_fixup(ctx, attr); in schema_type_fixup()
2276 schema_attributegroup_fixup(ctx, attr, type->attributes); in schema_type_fixup()
2287 sdlAttributePtr attr; in schema_pass2() local
2291 ZEND_HASH_FOREACH_PTR(ctx->attributes, attr) { in schema_pass2()
2292 schema_attribute_fixup(ctx, attr); in schema_pass2()
2472 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute() local
2474 if (attr->ns) { in delete_extra_attribute()
2475 efree(attr->ns); in delete_extra_attribute()
2477 if (attr->val) { in delete_extra_attribute()
2478 efree(attr->val); in delete_extra_attribute()
2480 efree(attr); in delete_extra_attribute()
2485 sdlExtraAttributePtr attr = Z_PTR_P(zv); in delete_extra_attribute_persistent() local
2487 if (attr->ns) { in delete_extra_attribute_persistent()
2488 free(attr->ns); in delete_extra_attribute_persistent()
2490 if (attr->val) { in delete_extra_attribute_persistent()
2491 free(attr->val); in delete_extra_attribute_persistent()
2493 free(attr); in delete_extra_attribute_persistent()
2498 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute() local
2500 if (attr->def) { in delete_attribute()
2501 efree(attr->def); in delete_attribute()
2503 if (attr->fixed) { in delete_attribute()
2504 efree(attr->fixed); in delete_attribute()
2506 if (attr->name) { in delete_attribute()
2507 efree(attr->name); in delete_attribute()
2509 if (attr->namens) { in delete_attribute()
2510 efree(attr->namens); in delete_attribute()
2512 if (attr->ref) { in delete_attribute()
2513 efree(attr->ref); in delete_attribute()
2515 if (attr->extraAttributes) { in delete_attribute()
2516 zend_hash_destroy(attr->extraAttributes); in delete_attribute()
2517 efree(attr->extraAttributes); in delete_attribute()
2519 efree(attr); in delete_attribute()
2524 sdlAttributePtr attr = Z_PTR_P(zv); in delete_attribute_persistent() local
2526 if (attr->def) { in delete_attribute_persistent()
2527 free(attr->def); in delete_attribute_persistent()
2529 if (attr->fixed) { in delete_attribute_persistent()
2530 free(attr->fixed); in delete_attribute_persistent()
2532 if (attr->name) { in delete_attribute_persistent()
2533 free(attr->name); in delete_attribute_persistent()
2535 if (attr->namens) { in delete_attribute_persistent()
2536 free(attr->namens); in delete_attribute_persistent()
2538 if (attr->ref) { in delete_attribute_persistent()
2539 free(attr->ref); in delete_attribute_persistent()
2541 if (attr->extraAttributes) { in delete_attribute_persistent()
2542 zend_hash_destroy(attr->extraAttributes); in delete_attribute_persistent()
2543 free(attr->extraAttributes); in delete_attribute_persistent()
2545 free(attr); in delete_attribute_persistent()