double quotes in expression

Steve Lime steve.lime at DNR.STATE.MN.US
Mon May 16 13:14:18 EDT 2005


Hi Bill: No, there's no escaping there at the moment. Never got around
to extending the regular expressions in maplexer.l to handle them. Just
not been a priority. That's probably because I'm not aware of a single
instance where that was a limitation. Doesn't mean that it can never
happen, as your example shows.

Steve

>>> Bill Binko <bill at binko.net> 5/12/2005 5:48:28 PM >>>
On Thu, 12 May 2005, Steve Lime wrote:

> You could:
>
>  1) Write your expression like so using single quotes:
>
>     EXPRESSION 'Symbol (12, 1, "ESRI IGL Font20", 1)'
>
>  2) Perhaps consider looking for sub-strings with regular
expressions? Depends on how the values differ though from symbol to
symbol (that is is the 12, the 1, the "ESRI IGL Font20" or the 1 really
important):
>
>     EXPRESSION /ESRI IGL FONT 20/
>
> Steve


Steve,

Is there an escape character in Mapserver strings?  For example, does
\"
mean a literal quotation mark?

I can imagine times where the switch to single quotes won't help, for
example, someone with polycap tablenames in a PostGIS connection (note
the
other running thread on this and the postgis-users board).

DATA "geom from (SELECT geom, oid from \"PolyCapTableName\" where
feature
= 'FooBar') as foo using unique oid using SRID 123"

Since 'FooBar' needs the single quotes for PostGIS, using single quotes

for the whole thing won't work.

Looking at the code, it looks like something could be done in
maplexer.c
or mapfile.c to perform that escape on reading the strings.  It might
help
solve alot of these issues.

Just a thought

Bill



More information about the mapserver-users mailing list