From d2202d44355bb4c94c1fe8f5433748de19041613 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Tue, 12 Oct 2004 16:47:38 +0000 Subject: [PATCH] Enabled retrieval of Zebra metadata in XML with element selection in effect --- data1/d1_espec.c | 4 +++- recctrl/recgrs.c | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/data1/d1_espec.c b/data1/d1_espec.c index b9ccd3e..d27d530 100644 --- a/data1/d1_espec.c +++ b/data1/d1_espec.c @@ -1,4 +1,4 @@ -/* $Id: d1_espec.c,v 1.2.2.1 2004-10-05 12:25:34 adam Exp $ +/* $Id: d1_espec.c,v 1.2.2.2 2004-10-12 16:47:38 quinn Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -218,6 +218,7 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file) char *argv[50], line[512]; Z_Espec1 *res = (Z_Espec1 *)nmem_malloc(nmem, sizeof(*res)); + yaz_log(LOG_DEBUG, "Espec1 reading file '%s'", file); if (!(f = data1_path_fopen(dh, file, "r"))) { yaz_log(LOG_WARN|LOG_ERRNO, "%s", file); @@ -300,6 +301,7 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file) char *ep; int num, i = 0; + yaz_log(LOG_DEBUG, "Simpleelemnt: '%s'", line); if (!res->elements) res->elements = (Z_ElementRequest **) nmem_malloc(nmem, size_esn = 24*sizeof(er)); diff --git a/recctrl/recgrs.c b/recctrl/recgrs.c index e0d1702..5565abb 100644 --- a/recctrl/recgrs.c +++ b/recctrl/recgrs.c @@ -1,4 +1,4 @@ -/* $Id: recgrs.c,v 1.86.2.1 2004-08-24 14:06:32 adam Exp $ +/* $Id: recgrs.c,v 1.86.2.2 2004-10-12 16:47:38 quinn Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps @@ -1191,6 +1191,10 @@ static int grs_retrieve(void *clientData, struct recRetrieveCtrl *p) sprintf(dnew->u.data.data, "%d", p->localno); dnew->u.data.len = strlen(dnew->u.data.data); } + + if (p->input_format == VAL_TEXT_XML) + zebra_xml_metadata (p, top, mem); + #if 0 data1_pr_tree (p->dh, node, stdout); #endif @@ -1322,7 +1326,6 @@ static int grs_retrieve(void *clientData, struct recRetrieveCtrl *p) p->input_format : VAL_SUTRS)) { case VAL_TEXT_XML: - zebra_xml_metadata (p, top, mem); #if 0 data1_pr_tree (p->dh, node, stdout); -- 1.7.10.4