From: Adam Dickmeiss Date: Wed, 2 Oct 2013 13:17:45 +0000 (+0200) Subject: Fix NS for SRU explain for version 2.0 YAZ-697 X-Git-Tag: v5.0.1~5 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=65b797ebae01184ec6e22c2ecfc2ce1de8eaf169;p=yaz-moved-to-github.git Fix NS for SRU explain for version 2.0 YAZ-697 --- diff --git a/src/srw.c b/src/srw.c index 17b7c39..821fdca 100644 --- a/src/srw.c +++ b/src/srw.c @@ -983,6 +983,8 @@ int yaz_srw_codec(ODR o, void * vptr, Z_SRW_PDU **handler_data, else if ((*p)->which == Z_SRW_explain_request) { Z_SRW_explainRequest *req = (*p)->u.explain_request; + if (version2) + ns = "http://docs.oasis-open.org/ns/search-ws/sruRequest"; ptr = xmlNewChild(pptr, 0, BAD_CAST "explainRequest", 0); ns_srw = xmlNewNs(ptr, BAD_CAST ns, BAD_CAST "zs"); xmlSetNs(ptr, ns_srw); @@ -1001,6 +1003,8 @@ int yaz_srw_codec(ODR o, void * vptr, Z_SRW_PDU **handler_data, else if ((*p)->which == Z_SRW_explain_response) { Z_SRW_explainResponse *res = (*p)->u.explain_response; + if (version2) + ns = "http://docs.oasis-open.org/ns/search-ws/sruResponse"; ptr = xmlNewChild(pptr, 0, BAD_CAST "explainResponse", 0); ns_srw = xmlNewNs(ptr, BAD_CAST ns, BAD_CAST "zs"); xmlSetNs(ptr, ns_srw);