From b08d68a3edac5a93dce61f98d2f030ea722311c4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 10 Dec 2002 13:14:14 +0000 Subject: [PATCH] ZOOM_record_get: xml returns MARC XML instead of OAI MARC --- CHANGELOG | 6 +++--- zutil/zoom-c.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2995857..e6929f7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,11 +9,11 @@ but returns diagnostic set as well. New function yaz_strerror which is a portable wrapper for strerror/strerror_r/GetLastMessage. -ZOOM_record_get supports type "xml" in which case OAI MARC is -returned for MARC. If type is "MarcXML" , MARC XML is returned. +* ZOOM_record_get supports type "xml" in which case MARC XML (from LOC) +is returned for MARC. If type is "oai", then OAI MARC is returned. yaz_marc_decode supports MARC XML as well. The xml parameter -specifies type. See include/marcdisp.h +specifies type. See include/yaz/marcdisp.h Fix creation of lib/yaz-config so it works if srcdir != objdir. Patch from Kang-Jin Lee. diff --git a/zutil/zoom-c.c b/zutil/zoom-c.c index 1363725..dc04658 100644 --- a/zutil/zoom-c.c +++ b/zutil/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2002, Index Data * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.10 2002-12-09 23:32:29 adam Exp $ + * $Id: zoom-c.c,v 1.11 2002-12-10 13:14:14 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -1133,7 +1133,7 @@ ZOOM_record_get (ZOOM_record rec, const char *type, int *len) return 0; } else if (npr->which == Z_NamePlusRecord_databaseRecord && - (!strcmp (type, "xml") || !strcmp(type, "MarcXML"))) + (!strcmp (type, "xml") || !strcmp(type, "oai"))) { Z_External *r = (Z_External *) npr->u.databaseRecord; oident *ent = oid_getentbyoid(r->direct_reference); @@ -1145,10 +1145,10 @@ ZOOM_record_get (ZOOM_record rec, const char *type, int *len) } else if (r->which == Z_External_octet) { - int marc_decode_type = YAZ_MARC_OAIMARC; + int marc_decode_type = YAZ_MARC_MARCXML; - if (!strcmp(type, "MarcXML")) - marc_decode_type = YAZ_MARC_MARCXML; + if (!strcmp(type, "oai")) + marc_decode_type = YAZ_MARC_OAIMARC; switch (ent->value) { case VAL_SOIF: -- 1.7.10.4