- elements[0]->value.complex->list[0]->which = Z_StringOrNumeric_string;
- elements[0]->value.complex->list[0]->u.string = odr_strdup(o, name);
- elements[0]->value.complex->semanticAction = 0;
- elements[0]->value.complex->num_semanticAction = 0;
- attributes->attributes = elements;
+ element->value.complex->list[0]->which = Z_StringOrNumeric_string;
+ element->value.complex->list[0]->u.string = odr_strdup(o, value);
+ element->value.complex->semanticAction = 0;
+ element->value.complex->num_semanticAction = 0;
+ return element;
+}
+
+Z_AttributeList *yaz_use_attribute_create(ODR o, const char *name)
+{
+ Z_AttributeList *attributes = (Z_AttributeList *)
+ odr_malloc(o, sizeof(*attributes));
+
+ attributes->num_attributes = 1;
+ attributes->attributes = (Z_AttributeElement**)
+ odr_malloc(o, sizeof(*attributes->attributes));
+ attributes->attributes[0] = yaz_string_element_create(o, 1, name);