INCLUDE tag functionality extension... maybe grounds for
smallish RFC
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Fri Nov 30 09:09:57 EST 2007
Attila Csipa wrote:
> On Friday 30 November 2007 05:22:58 Steve Lime wrote:
>> There's some merit here I think. When including files from a directory do
>> you only load those with a certain extension(s)? I could see running into
>> problems when you leave a stray editor file (e.g. an emacs .map~ file)
>
> The original solution mirrors the way apache works (=does not rely on
> extensions) but since there is a well established extension for map files
> (case insensitive .map), I guess it would be a reasonable choice to filter
> out non .map-s . Also, since it's not much work, I'd suggest including
> similar functionality by the RFC to all keywords where multiple file
> inclusion/processing makes sense. A quick scan through the mapfile reference
> doc tells me the candidates for this are for example FONTSET and SYMBOLSET.
Attila,
This sounds like a very useful extension. The way I think that I would
like to use this would be to have a "default" path that provides an
generic set of includes. But for some clients or users, be able to
override the path so they would get there custom set of files.
I was thinking of some like:
/u/mapfiles/project1/... <set of "default" includes>
/u/mapfiles/project1/steve/... <set of includes for steve>
/u/mapfiles/project1/attila/... <set of includes for attila>
and a <set of includes> would look like:
style-road-5k.map
style-road-10k.map
style-road-50k.map
style-road-100k.map
etc.
and then in the mapfile have something like:
INCLUDEPATH "/u/mapfiles/project1/%USER%/"
which would all CGI substitution of the variable USER=steve
If you really want to get fancy, I would change this to support this as
overrides, such that in steve you would not need a complete set of
files, but only those that were different from the "default", maybe like:
INCLUDEDEFAULT "/u/mapfiles/project1/default/"
INCLUDEPATH "/u/mapfiles/project1/%USER%/"
So if the file is missing in the INCLUDEPATH tree, then it looks in
INCLUDEDEFAULT tree, then trows an error if it is not found.
Anyway, some food for thought ....
Best regards,
-Steve W
More information about the mapserver-dev
mailing list