X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fmod_dom.c;h=ea09c31013562878d5cd8d11f38736a0e1c62819;hb=1872e3fc60b482771bbd1cb4b0290b8d6a9ef5d0;hp=05f2009592e3095ccdb01ce1d986f7dce5a07b2c;hpb=f22aee0a271559cb1fc0eed0b7583019e34fc4e0;p=idzebra-moved-to-github.git diff --git a/index/mod_dom.c b/index/mod_dom.c index 05f2009..ea09c31 100644 --- a/index/mod_dom.c +++ b/index/mod_dom.c @@ -1,5 +1,4 @@ - -/* $Id: mod_dom.c,v 1.33 2007-04-02 16:57:08 adam Exp $ +/* $Id: mod_dom.c,v 1.35 2007-04-16 08:44:31 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -44,6 +43,7 @@ #include #include +#include /* DOM filter style indexing */ #define ZEBRA_DOM_NS "http://indexdata.com/zebra-2.0" @@ -1388,7 +1388,7 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) { 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_xml())) { xmlChar *buf_out; int len_out; @@ -1398,13 +1398,13 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) else xmlDocDumpMemory(doc, &buf_out, &len_out); - p->output_format = VAL_TEXT_XML; + p->output_format = yaz_oid_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_sutrs())) { xmlChar *buf_out; int len_out; @@ -1414,7 +1414,7 @@ static int filter_retrieve (void *clientData, struct recRetrieveCtrl *p) else xmlDocDumpMemory(doc, &buf_out, &len_out); - p->output_format = VAL_SUTRS; + p->output_format = yaz_oid_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);