[mapserver-users] XML mapfile?

Puneet Kishor pkishor at GeoAnalytics.com
Wed May 22 12:04:06 EDT 2002


I have wondered about XML myself, and thought, at times, that it would 
be cool to have XML. Now, reading Daniel's reasoning, I must say what he 
says makes sense... besides the cool factor, we have to question what 
XML will do for us. XML facilitates inter-application communication... 
other than that it is a pain in the ass. If Mapserver is the only 
program gonna be reading the mapfile, we can make it whatever we want it 
to, and what it is now is good enough.

However, in the spirit of discussion, there is one area where XML might 
be helpful. Most code editors (Homesite, jEdit, Pepper) nowadays can 
parse XML to create an XML tree. This can make editing a complex Mapfile 
easier as one can check for node closures, correctness and completeness.

Other than that, I don't see any great advantage to XML.

pk/




On Wednesday, May 22, 2002, at 07:19  AM, Daniel Morissette wrote:

> C F wrote:
>>
>> It seems that this and many other problems I encounter could be solved 
>> by
>> making the .map file format XML based.  I searched the archives and 
>> have
>> seen quite a bit of discussion on it but I didn't a conclusion.  The 
>> benefit
>> for me being that I could download and easily parse and retrieve any
>> information I needed using XPath.  Is this being considered at all?  
>> If so,
>> I'd be happy to contribute to the discussion and development 
>> (wherever I
>> could, but I don't know the C language yet) if that would help.  A
>> combination of an XML mapfile, XSLT templates and XPath extremely 
>> powerful
>> compared the current template files.
>
>
> I think that Steve has been considering a switch to XML eventually, but
> I don't think there is any formal plan.
>
> I agree that XML might give more flexibility to the user by allowing him
> to read the mapfile from external tools, but it would be at the cost of
> performance (i.e. speed) when parsing the mapfile for every request.
> Combine this loss of performance with the fact that XML would be harder
> to edit manually than the current format, and you know where I stand
> personally.
>
> I'm not saying that if we were redesigning from scratch I wouldn't
> consider XML (we use it a lot in other apps), but since we've already
> got a very good (fast and simple) mapfile format then I won't be the one
> initiating a switch to XML mapfiles.
>
> Note that MapScript already gives you access to almost every piece of
> information from the mapfile, so when the CGI cannot do what you need
> then the logic path is to switch to MapScript, and then sky is the
> limit.
>
> My 0.02$
> --
> ------------------------------------------------------------
>  Daniel Morissette               morissette at dmsolutions.ca
>  DM Solutions Group              http://www.dmsolutions.ca/
> ------------------------------------------------------------
>   Don't put for tomorrow what you can do today, because if
>       you enjoy it today you can do it again tomorrow.




More information about the mapserver-users mailing list