* Copyright (C) 1995-2005, Index Data ApS
* All rights reserved.
*
- * $Id: querytowrbuf.c,v 1.4 2006-04-19 10:05:03 adam Exp $
+ * $Id: querytowrbuf.c,v 1.5 2006-07-07 12:09:05 marc Exp $
*/
/** \file querytowrbuf.c
{
case Z_Query_type_1:
case Z_Query_type_101:
- wrbuf_printf(b,"RPN: ");
+ wrbuf_printf(b,"RPN ");
yaz_rpnquery_to_wrbuf(b, q->u.type_1);
break;
case Z_Query_type_2:
- wrbuf_printf(b, "CCL: %.*s", q->u.type_2->len, q->u.type_2->buf);
+ wrbuf_printf(b, "CCL %.*s", q->u.type_2->len, q->u.type_2->buf);
break;
case Z_Query_type_100:
- wrbuf_printf(b, "Z39.58: %.*s", q->u.type_100->len,
+ wrbuf_printf(b, "Z39.58 %.*s", q->u.type_100->len,
q->u.type_100->buf);
break;
case Z_Query_type_104:
if (q->u.type_104->which == Z_External_CQL)
- wrbuf_printf(b, "CQL: %s", q->u.type_104->u.cql);
+ wrbuf_printf(b, "CQL %s", q->u.type_104->u.cql);
else
- wrbuf_printf(b,"Unknown type 104 query %d", q->u.type_104->which);
+ wrbuf_printf(b,"UNKNOWN type 104 query %d", q->u.type_104->which);
}
}
oid_value ast)
{
/* should print attr set here */
+ wrbuf_printf(b, "RPN ");
yaz_apt_to_wrbuf(b, zapt);
}
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tstxmlquery.c,v 1.11 2006-07-06 10:17:55 adam Exp $
+ * $Id: tstxmlquery.c,v 1.12 2006-07-07 12:09:05 marc Exp $
*/
#include <stdlib.h>
"<apt><attr type=\"1\" value=\"4\"/>"
"<term type=\"general\">computer</term></apt>"
"</rpn></query>\n",
- "RPN: @attrset Bib-1 @attr 1=4 computer"
+ "RPN @attrset Bib-1 @attr 1=4 computer"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<attr type=\"2\" value=\"1\"/>"
"<term type=\"general\">computer</term></apt>"
"</rpn></query>\n",
- "RPN: @attrset Bib-1 @attr \"1=title\" @attr 2=1 computer"
+ "RPN @attrset Bib-1 @attr \"1=title\" @attr 2=1 computer"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<attr type=\"2\" value=\"1\"/>"
"<term type=\"general\">computer</term></apt>"
"</rpn></query>\n",
- "RPN: @attrset Bib-1 @attr Exp-1 1=1 @attr 2=1 computer"
+ "RPN @attrset Bib-1 @attr Exp-1 1=1 @attr 2=1 computer"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<apt><term type=\"general\">a</term></apt>"
"<apt><term type=\"general\">b</term></apt>"
"</operator></rpn></query>\n",
- "RPN: @attrset Bib-1 @and a b"
+ "RPN @attrset Bib-1 @and a b"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<apt><term type=\"general\">b</term></apt></operator>"
"<apt><term type=\"general\">c</term></apt>"
"</operator></rpn></query>\n",
- "RPN: @attrset Bib-1 @or @and a b c"
+ "RPN @attrset Bib-1 @or @and a b c"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<?xml version=\"1.0\"?>\n"
"<query><rpn set=\"Bib-1\">"
"<rset>abe</rset></rpn></query>\n",
- "RPN: @attrset Bib-1 @set abe"
+ "RPN @attrset Bib-1 @set abe"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<apt><term type=\"general\">a</term></apt>"
"<apt><term type=\"general\">b</term></apt>"
"</operator></rpn></query>\n",
- "RPN: @attrset Bib-1 @prox 0 3 1 2 k 2 a b"
+ "RPN @attrset Bib-1 @prox 0 3 1 2 k 2 a b"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<apt>"
"<term type=\"numeric\">32</term></apt>"
"</rpn></query>\n",
- "RPN: @attrset Bib-1 @term numeric 32"
+ "RPN @attrset Bib-1 @term numeric 32"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<apt>"
"<term type=\"string\">computer</term></apt>"
"</rpn></query>\n",
- "RPN: @attrset Bib-1 @term string computer"
+ "RPN @attrset Bib-1 @term string computer"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<apt>"
"<term type=\"null\"/></apt>"
"</rpn></query>\n",
- "RPN: @attrset Bib-1 @term null x"
+ "RPN @attrset Bib-1 @term null x"
), XML_MATCH);
YAZ_CHECK_EQ(pqf2xml_text(
"<attr type=\"4\" value=\"2\"/>"
"<term type=\"general\">x</term></apt>"
"</rpn></query>\n",
- "RPN: @attrset GILS @attr 4=2 x"
+ "RPN @attrset GILS @attr 4=2 x"
), XML_MATCH);
#endif
}