static char *xml_context(const xmlNode *ptr, char *res, size_t len)
{
+ xmlAttr *attr = ptr->properties;
size_t off = len - 1;
+
res[off] = '\0';
+ for (; attr; attr = attr->next)
+ {
+ size_t l = strlen((const char *) attr->name);
+ if (off <= l + 1)
+ break;
+ off = off - l;
+ memcpy(res + off, attr->name, l);
+ res[--off] = '@';
+ }
while (ptr && ptr->type == XML_ELEMENT_NODE)
{
size_t l = strlen((const char *) ptr->name);
= nmem_malloc(nmem,
sizeof(struct conf_sortkey) * service->num_sortkeys);
+ service->xml_node = 0;
return service;
}
if (!pazpar2_decref(&service->ref_count, service->mutex))
{
service_xslt_destroy(service);
+ if (service->xml_node)
+ xmlFreeNode(service->xml_node);
pp2_charset_fact_destroy(service->charsets);
ccl_qual_rm(&service->ccl_bibset);
yaz_mutex_destroy(&service->mutex);
}
}
}
+ service->xml_node = xmlCopyNode(node, 1);
return service;
}