Hi
I have a problem using cql_filter with a “OR” statement. The filter looks like this: “cql_filter: ‘gem_bfs=2520+OR+gem_bfs=2521’” (as option in a OpenLayers layer definition). OpenLayers (or is it the browser??) then encodes the filter to: “gem_bfs%3D2520%2BOR%2Bgem_bfs%3D2521”. The “%3D” would work but encoded ±sign (“%2B”) results in a wms exception:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Could not parse CQL filter list.Encountered "OR" at line 1, column 14.
Was expecting one of:
<STRING_LITERAL> …
"true" …
"false" …
"(" …
"[" …
<INTEGER_LITERAL> …
<FLOATING_LITERAL> …
<IDENTIFIER> …
: gem_bfs=2520+OR+gem_bfs=2521, Current Token : +
Encountered "OR" at line 1, column 14.
Was expecting one of:
<STRING_LITERAL> …
"true" …
"false" …
"(" …
"[" …
<INTEGER_LITERAL> …
<FLOATING_LITERAL> …
<IDENTIFIER> …
: gem_bfs=2520+OR+gem_bfs=2521, Current Token : +
Encountered "OR" at line 1, column 14.
Was expecting one of:
<STRING_LITERAL> …
"true" …
"false" …
"(" …
"[" …
<INTEGER_LITERAL> …
<FLOATING_LITERAL> …
<IDENTIFIER> …
regards
Stefan
Mit freundlichem Gruss
Stefan Ziegler
Leiter Aufsicht
Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn
Telefon 032 627 75 96
Telefax 032 627 75 98
stefan.ziegler@anonymised.com
http://www.so.ch
Hi Stephan,
What version of GeoServer are you using? I know a while back there was an issue with cql filters similar to this one. I also tried an or filter similar to this one and it worked ok.
If you are using pre 1.6.1 please upgrade. If not can you include the source of the openlayers map. Thanks.
-Justin
Ziegler Stefan wrote:
Hi
I have a problem using cql_filter with a "OR" statement. The filter looks like this: "cql_filter: 'gem_bfs=2520+OR+gem_bfs=2521'" (as option in a OpenLayers layer definition). OpenLayers (or is it the browser??) then encodes the filter to: "gem_bfs%3D2520%2BOR%2Bgem_bfs%3D2521". The "%3D" would work but encoded +-sign ("%2B") results in a wms exception:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" > <ServiceException>
Could not parse CQL filter list.Encountered "OR" at line 1, column 14.
Was expecting one of:
<STRING_LITERAL> ...
"true" ...
"false" ...
"(" ...
"[" ...
<INTEGER_LITERAL> ...
<FLOATING_LITERAL> ...
<IDENTIFIER> ...
: gem_bfs=2520+OR+gem_bfs=2521, Current Token : +
Encountered "OR" at line 1, column 14.
Was expecting one of:
<STRING_LITERAL> ...
"true" ...
"false" ...
"(" ...
"[" ...
<INTEGER_LITERAL> ...
<FLOATING_LITERAL> ...
<IDENTIFIER> ...
: gem_bfs=2520+OR+gem_bfs=2521, Current Token : +
Encountered "OR" at line 1, column 14.
Was expecting one of:
<STRING_LITERAL> ...
"true" ...
"false" ...
"(" ...
"[" ...
<INTEGER_LITERAL> ...
<FLOATING_LITERAL> ...
<IDENTIFIER> ...
</ServiceException></ServiceExceptionReport>
regards
Stefan
Mit freundlichem Gruss
Stefan Ziegler
Leiter Aufsicht
Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn
Telefon 032 627 75 96
Telefax 032 627 75 98
stefan.ziegler@anonymised.com
http://www.so.ch
!DSPAM:4007,4819f53a278095409313003!
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
!DSPAM:4007,4819f53a278095409313003!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4007,4819f53a278095409313003!
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com