/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2012 Index Data
+ * Copyright (C) 1995-2013 Index Data
* See the file LICENSE for details.
*/
/**
{
wrbuf_printf(wr_error, "Element <xslt>: "
"attribute 'stylesheet' expected");
- return 0;
+ nmem_destroy(nmem);
}
else
{
if (path)
wrbuf_printf(wr_error, " with path '%s'", path);
+ nmem_destroy(nmem);
return 0;
}
info->xsp_doc = xmlParseFile(fullpath);
" xml parse failed: %s", stylesheet, fullpath);
if (path)
wrbuf_printf(wr_error, " with path '%s'", path);
+ nmem_destroy(nmem);
return 0;
}
/* need to copy this before passing it to the processor. It will
")");
xmlFreeDoc(info->xsp_doc);
nmem_destroy(info->nmem);
- return 0;
}
else
{
int ret = 0;
struct yaz_record_conv_rule *r = p->rules;
if (!r || r->type->construct != construct_marc)
+ {
+ wrbuf_puts(p->wr_error, "Expecting MARC rule as first rule for OPAC");
ret = -1; /* no marc rule so we can't do OPAC */
+ }
else
{
struct marc_info *mi = r->info;