[Mapserver-dev] include directive for mapfiles

Stephen Woodbridge woodbri at swoodbridge.com
Fri Oct 29 15:13:47 EDT 2004


Steve,

Wasn't there some discussion about rewriting the mapfile parse to be 
reentrant? could part of the rewrite requirements be to support includes 
and have it moved to a faster track?

-Steve W.

Steve Lime wrote:

> Wow, lot's of good conversation on the topic. It's been a "todo" for a
> long time, but I've been wary for technical and performance reasons. 
> Redirecting parsing from one file to another and then back doesn't work
> well using flex. So an INCLUDE directive doesn't fit well with the
> current setup. Anything's possible but I think it would get very messy
> very quickly. 
> 
> A pre-processor seems to me to be the best solution. Using the C
> preprocessor sounds like it works but is not a general solution for
> everyone. What about creating a set of functions and a utility for
> inclusion in the MapServer distribution? We could also probably invoke
> it in a runtime fashion if the pre-processor could produce the final
> mapfile in memory as a string. (there's already a bug filed for parsing
> mapfile snippets from strings)
> 
> The CGI already supports some runtime substitution for select directives
> like expressions and connection. That could be expanded as part of
> pre-processing perhaps.
> 
> In short, I like the idea but think a pre-processor, our own
> pre-processor may be a better way to achieve it. My 2 cents anyway.
> 
> Steve
> 
> Stephen Lime
> Data & Applications Manager
> 
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
> 
>>>>"Kralidis,Tom [Burlington]" <Tom.Kralidis at ec.gc.ca> 10/29/04 8:44 AM
>>>>
> 
> 
> Hi,
> 
> During a spirited conversation with Frank and Dave last night, I was
> encouraged to send a post w.r.t. this subject, so here goes:
> 
> For those of us running MapServer with multiple datasets, definitions,
> etc., it would be nice to be able to 'compartmentalize' mapfile chunks
> which other mapfiles can refer to.
> 
> I'd be interested in hearing others' thoughts of defining a new mapfile
> object called 'INCLUDE', which does just that, include contents of
> another mapfile, i.e.:
> 
> INCLUDE 'roads.map'
> 
> Comments?
> 
> Thanks
> 
> ..Tom
> 
> _______________________________________________
> Mapserver-dev mailing list
> Mapserver-dev at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
> 
> _______________________________________________
> Mapserver-dev mailing list
> Mapserver-dev at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
> 




More information about the mapserver-dev mailing list