From 84cb4c71eb572b5700cd7b3230446d9578521870 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 22 Jan 2007 10:35:07 +0000 Subject: [PATCH] Implemented alternative Item Order package for ZOOM. If option "doc" is set, that is treated as an ItemOrder with itemRequest being an XML document external. The value of "doc" is the content. --- NEWS | 4 ++++ src/zoom-c.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 88c13fb..ca1359f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Implemented alternative Item Order package for ZOOM. If option "doc" is set, +that is treated as an ItemOrder with itemRequest being an XML document +external. The value of "doc" is the content. + Extended the GFS search facility. New member of bend_search_rr 'estimated_hit_count' signals that hits is known to be an estmate (higher or lower than real hit count). New member 'partial_resultset' diff --git a/src/zoom-c.c b/src/zoom-c.c index 15047d4..4440884 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.108 2007-01-12 21:03:31 adam Exp $ + * $Id: zoom-c.c,v 1.109 2007-01-22 10:35:07 adam Exp $ */ /** * \file zoom-c.c @@ -1250,7 +1250,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c) odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.108 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.109 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = @@ -2958,7 +2958,13 @@ static Z_ItemOrder *encode_item_order(ZOOM_package p) *req->u.esRequest->notToKeep->resultSetItem->item = (str ? atoi(str) : 1); } - req->u.esRequest->notToKeep->itemRequest = encode_ill_request(p); + + str = ZOOM_options_get(p->options, "doc"); + if (str) + req->u.esRequest->notToKeep->itemRequest = + z_ext_record(p->odr_out, VAL_TEXT_XML, str, strlen(str)); + else + req->u.esRequest->notToKeep->itemRequest = encode_ill_request(p); return req; } -- 1.7.10.4