[mapserver-users] v5.0.0 - CLASSITEM has double quote in fieldvalue
Daniel Morissette
dmorissette at mapgears.com
Mon Jul 21 11:36:06 PDT 2008
Steve is right, I had only guessed that there might be a bug based on
the problem description, but we've been unable to reproduce the issue
that you report. I meant to reply on Friday asking for a testcase to
reproduce but I forgot.
Daniel
Steve Lime wrote:
> While I'm glad it works (the regex should execute faster too) the other
> expression should
> have worked as well. Can you share the data you were using for some
> testing?
>
> Steve
>
>>>> On 7/18/2008 at 8:16 AM, in message
> <5a9686e80807180616n492ec21cma0170d2dfc9633b9 at mail.gmail.com>, "Mike
> Saunt"
> <mikesaunt at gmail.com> wrote:
>> Alexandre
>>
>> Excellent - that works!
>>
>> FYI - This is why I believe that Open Source can easily prevail even
> when
>> people put down the 'many eyes see more bugs' notion. In another
> life I
>> worked with / as a partner for a proprietary company (now you can
> buy
>> franking machines from the same parent company wink wink nudge nudge)
> and
>> you'd never get this response so quickly and also having 'had it from
> the
>> horses mouth a.k.a. Developers' that there is an issue and this is
> the best
>> way around it.
>>
>> Thanks so much Alexandre
>>
>> Kind regards
>> Mike
>>
>>
>>
>>
>>
>> 2008/7/18 Alexandre Dube <adube at mapgears.com>:
>>
>>> I've been told by developers that there seems to be a bug when using
> " " in
>>> the expression parser...
>>>
>>> You should use a regular expression instead like the following :
>>>
>>> EXPRESSION /^Lane Closure$|^Multi-Way Signals$|^Road
> Closure$|^Stop\/Go
>>> Boards$|^Two-Way Signals$/
>>>
>>> See at : http://mapserver.gis.umn.edu/docs/howto/msexpressions
>>>
>>> Mike Saunt wrote:
>>>
>>>> thanks Alexandre but unfortunately it didn't work
>>>>
>>>> Do you know if there is a way of forcing MapServer to read out the
> literal
>>>> string i.e. sort of like escaping it? in .NET you can say
> @stringvariable
>>>> and it will ignore quotes inside etc?
>>>>
>>>> Cheers
>>>> Mike
>>>>
>>>> 2008/7/18 Alexandre Dube <adube at mapgears.com
> <mailto:adube at mapgears.com
>>>>>> :
>>>>
>>>> Hi Mike,
>>>>
>>>> I'm not sure about that, but try eq instead of =
>>>>
>>>> EXPRESSION ('[TRAFFIC_TYPE]' eq 'Lane Closure' OR ...
>>>>
>>>> Best Regards,
>>>> Alexandre
>>>>
>>>> Mike Saunt wrote:
>>>>
>>>> Hi All
>>>>
>>>> I've got a MapFile that used to work fine in v4.10 but now
>>>> fails in v5.0
>>>>
>>>> Basically the CLASSITEM field has double quote in field
> value
>>>> and this is then returning an error - msEvalExpression:
>>>> Expression parser error. Failed to parse expression
>>>>
>>>> The CLASS EXPRESSION looks like this
>>>> CLASSITEM 'TRAFFIC_TYPE' CLASS
>>>> EXPRESSION ('[TRAFFIC_TYPE]' = 'Lane Closure' OR
>>>> '[TRAFFIC_TYPE]' = 'Multi-Way Signals' OR '[TRAFFIC_TYPE]'
> =
>>>> 'Road Closure' OR '[TRAFFIC_TYPE]' = 'Stop/Go Boards' OR
>>>> '[TRAFFIC_TYPE]' = 'Two-Way Signals')
>>>> STYLE # Severe (RED)
>>>> SYMBOL 'triangle'
>>>> SIZE 9
>>>> COLOR 255 0 0
>>>> OUTLINECOLOR 0 0 0
>>>> END
>>>> END
>>>>
>>>> I've tried double quote vs. single quotes in the map file
> but
>>>> to no avail
>>>>
>>>> Anyone any thoughts?
>>>>
>>>> Kind regards
>>>> Mike
>>>>
>>>>
> ------------------------------------------------------------------------
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> <mailto:mapserver-users at lists.osgeo.org>
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>
>>>>
>>>>
>>>> -- Alexandre Dubé
>>>> Mapgears
>>>> www.mapgears.com <http://www.mapgears.com>
>>>>
>>>>
>>>>
> ------------------------------------------------------------------------
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>
>>>>
>>>
>>> --
>>> Alexandre Dubé
>>> Mapgears
>>> www.mapgears.com
>>>
>>>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list