<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Arial">Hi Steve,<br>
<br>
It worked! Thanks.<br>
<br>
Paco<br>
</font><br>
<br>
<br>
On 24/08/10 15:39, Lime, Steve D (DNR) wrote:
<blockquote
cite="mid:A7F7B3043D3BF0438F1206BAA3C9933C0298DFE7C1@MNMAIL05.ead.state.mn.us"
type="cite">
<pre wrap="">Hi Paco: Try quoting the text word in the block:
VALIDATION
'text' '^[a-zA-Z\-]+$'
END
The string 'text' is a reserved word and seems to be being recognized that way by the parser.
Steve
________________________________________
From: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Paco Regodón [<a class="moz-txt-link-abbreviated" href="mailto:mapserver@meteologica.es">mapserver@meteologica.es</a>]
Sent: Tuesday, August 24, 2010 7:57 AM
To: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
Subject: [mapserver-users] mapfile text modification via URL
Hello all,
I'm having difficulties changing mapfile trough url with mapserver 5.6.5.
This is my layer:
LAYER
NAME test
STATUS DEFAULT
LABELCACHE OFF
TRANSFORM FALSE
TYPE ANNOTATION
FEATURE
POINTS 300 300 END
END
CLASS
TEXT 'test'
COLOR -1 -1 -1
LABEL
COLOR 000 000 000
OUTLINECOLOR 255 255 255
SIZE MEDIUM
END
END
END
This is my query:
<a class="moz-txt-link-freetext" href="http://localhost/cgi-bin/mapserv?mode=map&map=test.map&map.layer">http://localhost/cgi-bin/mapserv?mode=map&map=test.map&map.layer</a>[test].class[0]=text+'hello'
...And this is my error message: :-)
[Tue Aug 24 12:43:43 2010].949611 msValidateParameter(): Regular expression error. Parameter pattern validation failed.
[Tue Aug 24 12:43:43 2010].949665 loadClass(): General error message. URL-based TEXT configuration failed pattern validation.
I found RFC 44 (<a class="moz-txt-link-freetext" href="http://mapserver.org/development/rfc/ms-rfc-44.html">http://mapserver.org/development/rfc/ms-rfc-44.html</a>) and bug #2971 (<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapserver/ticket/2971">http://trac.osgeo.org/mapserver/ticket/2971</a>).
I have tried adding a VALIDATION block to my layer:
VALIDATION
text '^[a-zA-Z\-]+$'
END
Now, i'm getting this different error message:
[Tue Aug 24 12:41:52 2010].243629 loadHashTable(): Unknown identifier. Parsing error near (text):(line 36)
[Tue Aug 24 12:41:52 2010].243675 msFreeMap(): freeing map at 0x690420.
How do you change text through url?
Thanks,
Paco Regodón
</pre>
</blockquote>
</body>
</html>