From: Adam Dickmeiss Date: Tue, 28 Feb 2012 11:31:48 +0000 (+0100) Subject: zoom: tweak element set rules X-Git-Tag: v1.3.25~11 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=fc117fe38417cf8f1907547132d064958e816601;p=metaproxy-moved-to-github.git 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). --- 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;