From fc117fe38417cf8f1907547132d064958e816601 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 28 Feb 2012 12:31:48 +0100 Subject: [PATCH] zoom: tweak element set rules If element is not pz2/raw, use explain_xsp if present; if explain_xsp is not present don't do any pz2 retrievals (old behavior). --- src/filter_zoom.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index 6ca6015..900b45e 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -1242,19 +1242,20 @@ void yf::Zoom::Frontend::prepare_elements(BackendPtr b, const char *syntax_name = 0; if (preferredRecordSyntax && - !oid_oidcmp(preferredRecordSyntax, yaz_oid_recsyn_xml) - && element_set_name) + !oid_oidcmp(preferredRecordSyntax, yaz_oid_recsyn_xml)) { - if (!strcmp(element_set_name, m_p->element_transform.c_str())) + if (element_set_name && + !strcmp(element_set_name, m_p->element_transform.c_str())) { enable_pz2_retrieval = true; enable_pz2_transform = true; } - else if (!strcmp(element_set_name, m_p->element_raw.c_str())) + else if (element_set_name && + !strcmp(element_set_name, m_p->element_raw.c_str())) { enable_pz2_retrieval = true; } - else + else if (m_p->record_xsp) { enable_pz2_retrieval = true; enable_pz2_transform = true; -- 1.7.10.4