-/* $Id: alvis.c,v 1.14 2007-03-07 14:18:35 marc Exp $
+/* $Id: alvis.c,v 1.17 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
#include <yaz/diagbib1.h>
#include <yaz/tpath.h>
+#include <yaz/oid_db.h>
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
else
wrbuf_printf(wrbuf, "</snippet>\n");
- xml_doc_str = odr_strdup(p->odr, wrbuf_buf(wrbuf));
+ xml_doc_str = odr_strdup(p->odr, wrbuf_cstr(wrbuf));
zebra_snippets_destroy(res);
- wrbuf_free(wrbuf, 1);
+ wrbuf_destroy(wrbuf);
return xml_doc_str;
}
{
p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS;
}
- else if (p->input_format == VAL_NONE || p->input_format == VAL_TEXT_XML)
+ else if (!p->input_format
+ || !oid_oidcmp(p->input_format, yaz_oid_recsyn_xml))
{
xmlChar *buf_out;
int len_out;
else
xmlDocDumpMemory(resDoc, &buf_out, &len_out);
- p->output_format = VAL_TEXT_XML;
+ p->output_format = yaz_oid_recsyn_xml;
p->rec_len = len_out;
p->rec_buf = odr_malloc(p->odr, p->rec_len);
memcpy(p->rec_buf, buf_out, p->rec_len);
xmlFree(buf_out);
}
- else if (p->output_format == VAL_SUTRS)
+ else if (!oid_oidcmp(p->output_format, yaz_oid_recsyn_sutrs))
{
xmlChar *buf_out;
int len_out;
else
xmlDocDumpMemory(resDoc, &buf_out, &len_out);
- p->output_format = VAL_SUTRS;
+ p->output_format = yaz_oid_recsyn_sutrs;
p->rec_len = len_out;
p->rec_buf = odr_malloc(p->odr, p->rec_len);
memcpy(p->rec_buf, buf_out, p->rec_len);