Seems to be a bug in MapServers OGC filter implementation (mapogcfilter.c). I 
think it blindly handles XML nodes without checking there types which makes 
comments and text nodes being used as filter arguments as well... The code from 
MS 5.6.6 is the same as in 6.0rc2 so falling back to a previous version won't 
be a solution :(

 

> -----Ursprüngliche Nachricht-----
> Von: [email protected] 
> [mailto:[email protected]] Im Auftrag 
> von Arnd Wippermann
> Gesendet: Samstag, 7. Mai 2011 00:30
> An: [email protected]
> Betreff: [mapserver-users] SLD Filter with comment breaks filter
> 
> Hi,
> 
> The filter PropertyIsLike works now as expected with 6 RC2.
> 
> I have noticed two other issues:
> 
> 1. The use of a filter And/Or with two or more conditions and adding a
> comment between the conditions
> resolves to true for all features, whether true or not.
> 
> <Filter>
> <And>
>   <PropertyIsLike wildCard="*" singleChar="." escape="!">
>   <PropertyName>NA3DESC</PropertyName><Literal>Asia</Literal>
>   </PropertyIsLike>
>   <!-- comment causes only one class in temporary mapfile -->
>   <PropertyIsLike wildCard="*" singleChar="." escape="!">
>   <PropertyName>DESCRIPTIO</PropertyName><Literal>Continent</Literal>
>   </PropertyIsLike>
> </And>
> </Filter> 
> 
> 2. The use of a filter And/Or with only one condition
> resolves to true for all features, whether true or not.
> 
> <Filter>
> <And>
>   <PropertyIsLike wildCard="*" singleChar="." escape="!">
>   <PropertyName>NA3DESC</PropertyName><Literal>Asia</Literal>
>   </PropertyIsLike>
> </And>
> </Filter> 
> 
> Arnd
> 
> 
> _______________________________________________
> mapserver-users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to