From 94d2f62cf9d0185e933e238ae36081b00e43d1a0 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 1 Mar 2004 17:33:02 +0000 Subject: [PATCH] Another fix for decoding of XML packed records. Version 2.0.15. --- CHANGELOG | 4 ++++ client/client.c | 8 +++++++- configure.in | 4 ++-- debian/changelog | 6 ++++++ include/yaz/yaz-version.h | 6 +++--- src/srw.c | 4 ++-- src/srwutil.c | 4 ++-- win/yaz.nsi | 4 ++-- win/yaz.rc | 8 ++++---- 9 files changed, 32 insertions(+), 16 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 31e541f..0c22fbe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ Possible compatibility problems with earlier versions marked with '*'. +--- 2.0.15 2004/03/01 + +Another fix for decoding of XML packed records. + --- 2.0.14 2004/02/25 Fixes for Chunked encoding. White space not ignored after length spec. diff --git a/client/client.c b/client/client.c index 8e96b78..bf3ee37 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.233 2004-02-19 23:39:13 adam Exp $ + * $Id: client.c,v 1.234 2004-03-01 17:33:02 adam Exp $ */ #include @@ -1215,6 +1215,8 @@ static int send_SRW_searchRequest(const char *arg) if (record_schema) sr->u.request->recordSchema = record_schema; + if (recordsyntax == VAL_TEXT_XML) + sr->u.explain_request->recordPacking = "xml"; return send_srw(sr); } #endif @@ -2153,6 +2155,8 @@ static int cmd_explain(const char *arg) /* save this for later .. when fetching individual records */ sr = yaz_srw_get(out, Z_SRW_explain_request); + if (recordsyntax == VAL_TEXT_XML) + sr->u.explain_request->recordPacking = "xml"; send_srw(sr); return 2; } @@ -2389,6 +2393,8 @@ static int send_SRW_presentRequest(const char *arg) sr->u.request->maximumRecords = odr_intdup(out, nos); if (record_schema) sr->u.request->recordSchema = record_schema; + if (recordsyntax == VAL_TEXT_XML) + sr->u.request->recordPacking = "xml"; return send_srw(sr); } #endif diff --git a/configure.in b/configure.in index 5801730..82859f6 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,8 @@ dnl YAZ Toolkit, Index Data 1994-2004 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.130 2004-02-25 12:59:56 adam Exp $ +dnl $Id: configure.in,v 1.131 2004-03-01 17:33:02 adam Exp $ AC_INIT(include/yaz/yaz-version.h) -AM_INIT_AUTOMAKE(yaz, 2.0.14) +AM_INIT_AUTOMAKE(yaz, 2.0.15) AM_MAINTAINER_MODE dnl AC_SUBST(READLINE_LIBS) diff --git a/debian/changelog b/debian/changelog index 95cb6c4..c6fbc91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yaz (2.0.15-1) unstable; urgency=low + + * Upstream. + + -- Adam Dickmeiss Mon, 1 Mar 2004 17:58:23 +0100 + yaz (2.0.14-1) unstable; urgency=low * Upstream. diff --git a/include/yaz/yaz-version.h b/include/yaz/yaz-version.h index 3c3afea..bfaafb5 100644 --- a/include/yaz/yaz-version.h +++ b/include/yaz/yaz-version.h @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-version.h,v 1.39 2004-02-25 12:59:56 adam Exp $ + * $Id: yaz-version.h,v 1.40 2004-03-01 17:33:02 adam Exp $ */ /* @@ -12,8 +12,8 @@ #include -#define YAZ_VERSION "2.0.14" -#define YAZ_VERSIONL 0x02000E +#define YAZ_VERSION "2.0.15" +#define YAZ_VERSIONL 0x02000F #define YAZ_DATE 1 diff --git a/src/srw.c b/src/srw.c index 7f57149..d65b258 100644 --- a/src/srw.c +++ b/src/srw.c @@ -2,7 +2,7 @@ * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: srw.c,v 1.23 2004-02-23 12:57:19 adam Exp $ + * $Id: srw.c,v 1.24 2004-03-01 17:33:03 adam Exp $ */ #include @@ -113,7 +113,7 @@ static int match_xsd_XML_n(xmlNodePtr ptr, const char *elem, ODR o, if (!match_element(ptr, elem)) return 0; ptr = ptr->children; - while (ptr && ptr->type != XML_TEXT_NODE && ptr->type != XML_COMMENT_NODE) + while (ptr && (ptr->type == XML_TEXT_NODE || ptr->type == XML_COMMENT_NODE)) ptr = ptr->next; if (!ptr) return 0; diff --git a/src/srwutil.c b/src/srwutil.c index 2475344..5a81820 100644 --- a/src/srwutil.c +++ b/src/srwutil.c @@ -2,7 +2,7 @@ * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: srwutil.c,v 1.13 2004-02-26 14:46:01 adam Exp $ + * $Id: srwutil.c,v 1.14 2004-03-01 17:33:03 adam Exp $ */ #include @@ -254,7 +254,7 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, char *scanClause = 0; char *recordXPath = 0; char *recordSchema = 0; - char *recordPacking = "xml"; + char *recordPacking = "xml"; /* xml packing is default for SRU */ char *maximumRecords = 0; char *startRecord = 0; char **uri_name; diff --git a/win/yaz.nsi b/win/yaz.nsi index d7a35ae..ae3a7cd 100644 --- a/win/yaz.nsi +++ b/win/yaz.nsi @@ -1,6 +1,6 @@ -; $Id: yaz.nsi,v 1.37 2004-02-25 12:59:57 adam Exp $ +; $Id: yaz.nsi,v 1.38 2004-03-01 17:33:03 adam Exp $ -!define VERSION "2.0.14" +!define VERSION "2.0.15" Name "YAZ" Caption "Index Data YAZ ${VERSION} Setup" diff --git a/win/yaz.rc b/win/yaz.rc index 03791b6..44ff787 100644 --- a/win/yaz.rc +++ b/win/yaz.rc @@ -54,8 +54,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,14,1 - PRODUCTVERSION 2,0,14,1 + FILEVERSION 2,0,15,1 + PRODUCTVERSION 2,0,15,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -73,14 +73,14 @@ BEGIN VALUE "Comments", "Z39.50 C Library\0" VALUE "CompanyName", "Index Data\0" VALUE "FileDescription", "YAZ Toolkit\0" - VALUE "FileVersion", "2, 0, 14, 1\0" + VALUE "FileVersion", "2, 0, 15, 1\0" VALUE "InternalName", "YAZ\0" VALUE "LegalCopyright", "Copyright © 1995-2004 Index Data\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "yaz.rc\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Index Data YAZ Toolkit\0" - VALUE "ProductVersion", "2, 0, 14, 1\0" + VALUE "ProductVersion", "2, 0, 15, 1\0" VALUE "SpecialBuild", "\0" END END -- 1.7.10.4