4 <?php if (!extension_loaded("yaz") || !function_exists("yaz_cql_parse")) print "skip"; ?>
7 $z = yaz_connect("bogus");
8 if (yaz_cql_parse($z, "computer", $res, false)) {
9 echo $res['rpn'] . "\n";
11 echo $res['errorcode'] . "\n";
13 yaz_cql_conf($z, array(
14 "set.cql" => "info:srw/cql-context-set/1/cql-v1.2",
15 "index.cql.serverChoice" => "1=1016",
16 "relation.eq" => "3=3",
17 "structure.*" => "4=1",
18 "position.any" => "6=1"
20 if (yaz_cql_parse($z, "computer", $res, false)) {
21 echo $res['rpn'] . "\n";
23 echo $res['errorcode'] . "\n";
25 if (yaz_cql_parse($z, "computer and", $res, true)) {
26 echo $res['cql'] . "\n";
28 echo $res['errorcode'] . "\n";
30 if (yaz_cql_parse($z, "computer", $res, true)) {
31 echo $res['cql'] . "\n";
33 echo $res['errorcode'] . "\n";
35 if (yaz_cql_parse($z, "@and a @attr 1=1016 b", $res, true)) {
36 echo $res['cql'] . "\n";
38 echo $res['errorcode'] . "\n";
40 if (yaz_cql_parse($z, "@and a", $res, true)) {
41 echo $res['cql'] . "\n";
43 echo $res['errorcode'] . "\n";
47 @attr 3=3 @attr 4=1 @attr 6=1 @attr 1=1016 "computer"