[mapserver-users] Mapfile verification tool

Josh Hevenor jhevenor at rogers.com
Tue May 15 14:37:57 EDT 2012


What's the state of the XML mapfile?   Could one create their mapfile in
an XML editor to generate a syntactically valid mapfile (through xslt)
then use shp2img to verify data connections?

On 5/15/2012 11:57 AM, Lime, Steve D (DNR) wrote:
> 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
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.455 / Virus Database: 271.1.1/4999 - Release Date: 05/14/12 18:05:00
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120515/a98e6546/attachment-0001.html


More information about the mapserver-users mailing list