- struct _xmlAttr *attr;
- struct convert_s *p
- = odr_malloc(tinfo->odr_config, sizeof(*p));
-
- p->next = 0;
- p->stylesheet = 0;
- p->stylesheet_xsp = 0;
-
- for (attr = ptr->properties; attr; attr = attr->next)
- if (attr_content(attr, "stylesheet", &p->stylesheet))
- ;
- else
- yaz_log(YLOG_WARN, "%s: dom filter: "
- "%s bad attribute @%s, "
- "expected @stylesheet",
- tinfo->fname,
- xmlGetNodePath(ptr), attr->name);
- if (p->stylesheet)
- {
- char tmp_xslt_full_name[1024];
- if (!yaz_filepath_resolve(p->stylesheet,
- tinfo->profile_path,
- NULL,
- tmp_xslt_full_name))
- {
- yaz_log(YLOG_WARN, "%s: dom filter: "
- "stylesheet %s not found in "
- "path %s",
- tinfo->fname,
- p->stylesheet,
- tinfo->profile_path);
- return ZEBRA_FAIL;
- }
-
- p->stylesheet_xsp
- = xsltParseStylesheetFile((const xmlChar*)
- tmp_xslt_full_name);
- if (!p->stylesheet_xsp)
- {
- yaz_log(YLOG_WARN, "%s: dom filter: "
- "could not parse xslt "
- "stylesheet %s",
- tinfo->fname, tmp_xslt_full_name);
- return ZEBRA_FAIL;
- }
- }
- else
- {
- yaz_log(YLOG_WARN, "%s: dom filter: "
- "%s missing attribute 'stylesheet' ",
- tinfo->fname, xmlGetNodePath(ptr));
- return ZEBRA_FAIL;
- }
- *l = p;
- l = &p->next;
+ xmlChar *node_path = xmlGetNodePath(ptr);
+ yaz_log(YLOG_WARN, "%s: dom filter: "
+ "%s bad attribute @%s, "
+ "expected @stylesheet",
+ tinfo->fname,
+ node_path, attr->name);
+ xmlFree(node_path);