From: Mike Taylor Date: Fri, 10 Mar 2006 14:43:13 +0000 (+0000) Subject: Map structure and other attributes before indexes, so that X-Git-Tag: YAZ.2.1.14~8 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=ca09c78fc8a550087b8f3469fd2c7842dea09a9b Map structure and other attributes before indexes, so that index-specific structures can override defaults. So: structure.* = 4=1 index.dc.date = 1=date-modified 4=5 does the right thing. --- diff --git a/NEWS b/NEWS index f36d557..1742c1b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +cql_transform() now map structure and other attributes before indexes, +so that index-specific structures and other attributes can override +defaults. So now a combination of mapping specifications such as: + structure.* = 4=1 + index.dc.date = 1=date-modified 4=5 +does the right thing. Added SRU-GET and SRU-POST support for ZOOM C. Option "sru" specifies which mode to use; one of "post", "get" or "soap" (SRW, default). diff --git a/src/cqltransform.c b/src/cqltransform.c index 1496466..69630e4 100644 --- a/src/cqltransform.c +++ b/src/cqltransform.c @@ -1,4 +1,4 @@ -/* $Id: cqltransform.c,v 1.18 2005-12-21 15:09:50 mike Exp $ +/* $Id: cqltransform.c,v 1.19 2006-03-10 14:43:13 mike Exp $ Copyright (C) 1995-2005, Index Data ApS Index Data Aps @@ -390,9 +390,6 @@ void cql_transform_r(cql_transform_t ct, (*pr)("\" ", client_data); return ; } - cql_pr_attr_uri(ct, "index", ns, - cn->u.st.index, "serverChoice", - pr, client_data, 16); } else { @@ -425,6 +422,11 @@ void cql_transform_r(cql_transform_t ct, } cql_pr_attr(ct, "structure", cn->u.st.relation, 0, pr, client_data, 24); + if (ns) { + cql_pr_attr_uri(ct, "index", ns, + cn->u.st.index, "serverChoice", + pr, client_data, 16); + } if (cn->u.st.relation && !cql_strcmp(cn->u.st.relation, "all")) { emit_wordlist(ct, cn, pr, client_data, "and");