<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    What's the state of the XML mapfile?&nbsp;&nbsp; Could one create their
    mapfile in an XML editor to generate a syntactically valid mapfile
    (through xslt) then use shp2img to verify data connections?<br>
    <br>
    On 5/15/2012 11:57 AM, Lime, Steve D (DNR) wrote:
    <blockquote
cite="mid:C549F0496453D842B4DD71AC8188DDC515ACF8@055-CH1MPN1-042.055d.mgd.msft.net"
      type="cite">
      <pre wrap="">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: <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-freetext" href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Ivan Mincik
Sent: Tuesday, May 15, 2012 10:24 AM
To: mapserver-users
Subject: Re: [mapserver-users] Mapfile verification tool

</pre>
      <blockquote type="cite">
        <pre wrap="">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.
</pre>
      </blockquote>
      <pre wrap="">
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
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>


_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
No virus found in this incoming message.
Checked by AVG - <a class="moz-txt-link-abbreviated" href="http://www.avg.com">www.avg.com</a> 
Version: 8.5.455 / Virus Database: 271.1.1/4999 - Release Date: 05/14/12 18:05:00

</pre>
    </blockquote>
  </body>
</html>