Perl script as template
Stephen Lime
steve.lime at dnr.state.mn.us
Thu Jun 8 11:40:13 PDT 2000
Not sure what sense it makes. The template is processed and sent directly to the
user. It is not processed by the server in any way. What does make sense is passing
mapserver results to a perl script or whatever for further processing. That can be
done already using URL templates. Basically you define a template that is a
string in the map file and that contains normal template substitutions. Once processed
the user is redirected to that url. Pretty useful. One limitation is that only single
result queries can be processed this way. For complex sets of results you have to
get sneaky. You can use a page containing only javascript to process and format
a url and once done processing you redirect the browser. It appears to the user
as a blank page (or you could display text like "hang on a minute...") and then
moves to the right page. Lot's of power here.
There is an example on the tutorial at the main mapserver web site that does just
this.
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Zolla Michalak <michalak at hwr.arizona.edu> 06/08/00 01:24PM >>>
I have a suggestion for future versions of mapserver, which I think might
be easy to implement. Correct me if I'm out to lunch.
I would like to be able to use a perl script (which generates html) for
the template file. Looks like it is catching my file name (.pl file) at
the TEMPLATE line in the map file, and rejecting it because of its
extention even before it looks at the perl.
Do you think this would be a possibility?
-zolla michalak
More information about the MapServer-users
mailing list