From: Adam Dickmeiss Date: Thu, 28 Jun 2007 07:58:07 +0000 (+0000) Subject: Changed CQL to XCQL conversion, so that element for relation value in X-Git-Tag: YAZ.3.0.10~33 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=8fc18939a7972d53f8f8c516ac41df0fe595f780;p=yaz-moved-to-github.git Changed CQL to XCQL conversion, so that element for relation value in modifier is 'comparison' rather than 'relation' so that it conforms to http://www.loc.gov/standards/sru/xml-files/xcql.xsd When a comparison value is omitted, the st.relation in cql_node will be NULL instead of "=". This has the effect that comparison will be omitted in those cases. --- diff --git a/src/cql.y b/src/cql.y index 187cba1..414feb8 100644 --- a/src/cql.y +++ b/src/cql.y @@ -1,4 +1,4 @@ -/* $Id: cql.y,v 1.13 2006-12-14 09:05:18 adam Exp $ +/* $Id: cql.y,v 1.14 2007-06-28 07:58:07 adam Exp $ Copyright (C) 2002-2006 Index Data ApS @@ -140,7 +140,7 @@ boolean: modifiers: modifiers '/' searchTerm { struct cql_node *mod = cql_node_mk_sc(((CQL_parser)parm)->nmem, - $3.buf, "=", 0); + $3.buf, 0, 0); mod->u.st.modifiers = $1.cql; $$.cql = mod; diff --git a/src/xcqlutil.c b/src/xcqlutil.c index cad5907..9eca708 100644 --- a/src/xcqlutil.c +++ b/src/xcqlutil.c @@ -1,4 +1,4 @@ -/* $Id: xcqlutil.c,v 1.7 2007-01-03 08:42:15 adam Exp $ +/* $Id: xcqlutil.c,v 1.8 2007-06-28 07:58:07 adam Exp $ Copyright (C) 1995-2007, Index Data ApS Index Data Aps @@ -104,9 +104,9 @@ static void cql_to_xml_mod(struct cql_node *m, pr_n("\n", pr, client_data, 0); if (m->u.st.relation) { - pr_n("", pr, client_data, level+4); + pr_n("", pr, client_data, level+4); pr_cdata(m->u.st.relation, pr, client_data); - pr_n("\n", pr, client_data, 0); + pr_n("\n", pr, client_data, 0); } if (m->u.st.term) { diff --git a/test/cql/2.11.out b/test/cql/2.11.out index bc04886..726a36e 100644 --- a/test/cql/2.11.out +++ b/test/cql/2.11.out @@ -5,7 +5,6 @@ stem - = diff --git a/test/cql/2.13.out b/test/cql/2.13.out index 4e66231..6f3c011 100644 --- a/test/cql/2.13.out +++ b/test/cql/2.13.out @@ -5,7 +5,7 @@ rel.algorithm - = + = CORI diff --git a/test/cql/2.14.out b/test/cql/2.14.out index e1e02a8..86df8e2 100644 --- a/test/cql/2.14.out +++ b/test/cql/2.14.out @@ -5,12 +5,11 @@ b.bar - > + > 1 f.foo - = diff --git a/test/cql/2.8.out b/test/cql/2.8.out index 3f45441..1576778 100644 --- a/test/cql/2.8.out +++ b/test/cql/2.8.out @@ -5,7 +5,6 @@ stem - = diff --git a/test/cql/2.9.out b/test/cql/2.9.out index 1222fac..241b7b5 100644 --- a/test/cql/2.9.out +++ b/test/cql/2.9.out @@ -5,11 +5,9 @@ fuzzy - = stem - = diff --git a/test/cql/4.2.out b/test/cql/4.2.out index 9280263..682adcd 100644 --- a/test/cql/4.2.out +++ b/test/cql/4.2.out @@ -10,7 +10,6 @@ stem - = diff --git a/test/cql/5.2.out b/test/cql/5.2.out index 1ad4e8a..323a671 100644 --- a/test/cql/5.2.out +++ b/test/cql/5.2.out @@ -4,16 +4,15 @@ ordered - = unit - = + = word distance - = + = 3 diff --git a/test/cql/5.3.out b/test/cql/5.3.out index 7700548..aa8ab2d 100644 --- a/test/cql/5.3.out +++ b/test/cql/5.3.out @@ -4,7 +4,7 @@ distance - < + < 3 diff --git a/test/cql/5.4.out b/test/cql/5.4.out index 5e93079..a08a64e 100644 --- a/test/cql/5.4.out +++ b/test/cql/5.4.out @@ -4,7 +4,7 @@ unit - = + = sentence diff --git a/test/cql/5.5.out b/test/cql/5.5.out index 1d03784..9212ca4 100644 --- a/test/cql/5.5.out +++ b/test/cql/5.5.out @@ -4,7 +4,7 @@ distance - <= + <= 5 diff --git a/test/cql/5.6.out b/test/cql/5.6.out index 20a88e9..b202f00 100644 --- a/test/cql/5.6.out +++ b/test/cql/5.6.out @@ -4,12 +4,12 @@ unit - = + = element distance - > + > 5 diff --git a/test/cql/5.7.out b/test/cql/5.7.out index 5274289..3a1f51b 100644 --- a/test/cql/5.7.out +++ b/test/cql/5.7.out @@ -4,7 +4,6 @@ rel.SumOfScores - = diff --git a/test/cql/5.8.out b/test/cql/5.8.out index 8759654..d406c53 100644 --- a/test/cql/5.8.out +++ b/test/cql/5.8.out @@ -4,7 +4,7 @@ rel.algorithm - = + = CORI