From 923e5434e220748e693701539ec07389fa9d4296 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 6 Jul 2007 14:31:06 +0000 Subject: [PATCH] Deal with OPAC records . These are converted to XML but character set is taken into account yet. --- src/logic.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/logic.c b/src/logic.c index e7f2941..28061a3 100644 --- a/src/logic.c +++ b/src/logic.c @@ -1,4 +1,4 @@ -/* $Id: logic.c,v 1.48 2007-07-04 12:07:49 adam Exp $ +/* $Id: logic.c,v 1.49 2007-07-06 14:31:06 adam Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -170,6 +170,18 @@ xmlDoc *record_to_xml(struct session_database *sdb, Z_External *rec) return 0; } } + else if (rec->which == Z_External_OPAC) + { + /* OPAC gets converted to XML too */ + WRBUF wrbuf_opac = wrbuf_alloc(); + yaz_display_OPAC(wrbuf_opac, rec->u.opac, 0); + + rdoc = xmlParseMemory((char*) wrbuf_buf(wrbuf_opac), + wrbuf_len(wrbuf_opac)); + if (!rdoc) + yaz_log(YLOG_WARN, "Unable to parse OPAC XML"); + wrbuf_destroy(wrbuf_opac); + } else if (oid && yaz_oid_is_iso2709(oid)) { /* ISO2709 gets converted to MARCXML */ -- 1.7.10.4