projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update for YAZ 3s libyaz_server.la
[idzebra-moved-to-github.git]
/
index
/
mod_dom.c
diff --git
a/index/mod_dom.c
b/index/mod_dom.c
index
eb4bc63
..
0670ab4
100644
(file)
--- a/
index/mod_dom.c
+++ b/
index/mod_dom.c
@@
-1,5
+1,4
@@
-
-/* $Id: mod_dom.c,v 1.32 2007-03-14 14:16:14 adam Exp $
+/* $Id: mod_dom.c,v 1.36 2007-04-16 21:54:37 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
Copyright (C) 1995-2007
Index Data ApS
@@
-44,6
+43,7
@@
#include <idzebra/util.h>
#include <idzebra/recctrl.h>
#include <idzebra/util.h>
#include <idzebra/recctrl.h>
+#include <yaz/oid_db.h>
/* DOM filter style indexing */
#define ZEBRA_DOM_NS "http://indexdata.com/zebra-2.0"
/* DOM filter style indexing */
#define ZEBRA_DOM_NS "http://indexdata.com/zebra-2.0"
@@
-822,7
+822,7
@@
static void set_record_info(struct filter_info *tinfo,
const char * type_p)
{
/* writing debug info out */
const char * type_p)
{
/* writing debug info out */
- if (1 || extctr->flagShowRecords)
+ if (extctr && extctr->flagShowRecords)
dom_log(YLOG_LOG, tinfo, node,
"RECORD id=%s rank=%s type=%s",
id_p ? (const char *) id_p : "(null)",
dom_log(YLOG_LOG, tinfo, node,
"RECORD id=%s rank=%s type=%s",
id_p ? (const char *) id_p : "(null)",
@@
-1388,7
+1388,8
@@
static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p)
{
p->diagnostic = YAZ_BIB1_SYSTEM_ERROR_IN_PRESENTING_RECORDS;
}
{
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;
{
xmlChar *buf_out;
int len_out;
@@
-1398,13
+1399,13
@@
static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p)
else
xmlDocDumpMemory(doc, &buf_out, &len_out);
else
xmlDocDumpMemory(doc, &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);
}
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;
{
xmlChar *buf_out;
int len_out;
@@
-1414,7
+1415,7
@@
static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p)
else
xmlDocDumpMemory(doc, &buf_out, &len_out);
else
xmlDocDumpMemory(doc, &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);
p->rec_len = len_out;
p->rec_buf = odr_malloc(p->odr, p->rec_len);
memcpy(p->rec_buf, buf_out, p->rec_len);