List Info

Thread: CQL2RPN boolean operators are case-sensitive - not standard




CQL2RPN boolean operators are case-sensitive - not standard
user name
2006-12-14 01:48:00
Hello,

I've noticed that cql2rpn module of YAZ expects only lower
case boolean
operators "and" and "or".
If using upper case AND or OR, the error is reported.

It is not correct according to http://www.loc.
gov/standards/sru/cql/ 
"All parts of CQL are case insensitive apart from user
supplied search
terms, which may or may not be case sensitive. 'OR','or',
'Or' and 'oR'
are all the same boolean operator."
 
To reproduce the behavior run yaxz-client.exe,
Z> querytype cql2rpn
Z> find start or stop 
No errors

Z> find start OR stop
              ^
Prefix query error: extra token (code 1)

Z> find start or stop
No errors
Z> find start AND stop
               ^
Prefix query error: extra token (code 1)

Regards,
Michael Freidgeim


_______________________________________________
Yazlist mailing list
Yazlistlists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yaz
list
CQL2RPN boolean operators are case-sensitive - not standard
user name
2006-12-14 08:56:46
Michael Freidgeim wrote:
> Hello,
> 
> I've noticed that cql2rpn module of YAZ expects only
lower case boolean
> operators "and" and "or".
> If using upper case AND or OR, the error is reported.
> 
> It is not correct according to http://www.loc.
gov/standards/sru/cql/ 
> "All parts of CQL are case insensitive apart from
user supplied search
> terms, which may or may not be case sensitive.
'OR','or', 'Or' and 'oR'
> are all the same boolean operator."

Correct.

> To reproduce the behavior run yaxz-client.exe,
> Z> querytype cql2rpn
> Z> find start or stop 
> No errors
> 
> Z> find start OR stop
>               ^
> Prefix query error: extra token (code 1)

A subtle error. The CQL parser is case insensitive (and has
been so 
since YAZ 2.1.8) but the resulting PQF has OR in
it.. And the PQF 
parser then fails!

> Z> find start or stop
> No errors
> Z> find start AND stop

Same situation.

Now fixed in our end. So it should work with next YAZ
release.

Thanks.

/ Adam

_______________________________________________
Yazlist mailing list
Yazlistlists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yaz
list
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )