/* This file is part of Pazpar2.
- Copyright (C) 2006-2009 Index Data
+ Copyright (C) 2006-2010 Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
else
sortkey_offset = -1;
- if (xml_mergekey && strcmp((const char *) xml_mergekey, "no"))
+ if (xml_mergekey)
{
- mergekey_type = Metadata_mergekey_yes;
+ if (!strcmp((const char *) xml_mergekey, "required"))
+ mergekey_type = Metadata_mergekey_required;
+ else if (!strcmp((const char *) xml_mergekey, "optional"))
+ mergekey_type = Metadata_mergekey_optional;
+ else if (!strcmp((const char *) xml_mergekey, "no"))
+ mergekey_type = Metadata_mergekey_no;
+ else
+ {
+ yaz_log(YLOG_FATAL, "Unknown value for mergekey: %s", xml_mergekey);
+ return -1;
+ }
}
xmlFree(xml_termlist);
xmlFree(xml_rank);
xmlFree(xml_setting);
+ xmlFree(xml_mergekey);
(*md_node)++;
return 0;
}
{
yaz_log(YLOG_LOG, "Configuration %s after include processing",
fname);
+#if LIBXML_VERSION >= 20600
xmlDocFormatDump(yaz_log_file(), doc, 0);
+#else
+ xmlDocDump(yaz_log_file(), doc);
+#endif
}
r = parse_config(config, n);
}