[mapserver-users] Mapfile verification tool

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue May 15 11:57:41 EDT 2012


Shp2img already provides this capability and is more portable than MapScript. I think ideally we'd develop 
a validator that spits out all errors but that's probably not possible either since many common error states 
(like a missing END or quote) will trigger a whole bunch of false positives. Best to take it an error at a 
time for most cases. This might be useful more for between version migration where the mapfile is structurally
sound but keywords have changed.

We could write a dumber version of shp2img that only tries to load the mapfile and report an error but I'm not
sure it's worth the effort.

Steve

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ivan Mincik
Sent: Tuesday, May 15, 2012 10:24 AM
To: mapserver-users
Subject: Re: [mapserver-users] Mapfile verification tool

> I don't think this will work because the mapfile is read all at once 
> and parsed into an internal data structure. You can't access it in 
> mapscript until the parser has read it and the parser will error out on any errors.

Understand, but i mean only valid/invalid output from test script. If some error will raised - mapfile is invalid, with no other information where otherwise mapfile is OK.


--
Ivan Mincik
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list