XML Template

Jan Hartmann j.l.h.hartmann at UVA.NL
Sat Nov 5 12:53:52 EST 2005


Hi Steve,

This works for query templates, but not for normal ones (mode=browse). 
There would be more possibilities for AJAX applications if Mapserver CGI 
could return these templates as XML too, with the correct MIME-type and 
without the  comment header. Is this possible?

Jan



Steve Lime wrote:
> Hi Tricia: You can change the MIME header returned by MapServer for queries by using the parameter QUERYFORMAT (in the WEB section). For example, the following would allow you to output SVG via templates:
> 
>   QUERYFORMAT 'image/svg+xml'
> 
> I'm pretty sure you can use .xml extensions on the various template files as well.
> 
> Steve
> 
> 
>>>>Tricia Williams <pgwillia at STUDENT.CS.UWATERLOO.CA> 11/03/05 4:24 PM >>>
> 
> Hi List,
> 
>    I was wondering if it is possible to use an xml template instead of a
> html template to handle nquery results?  I have tried experimenting but
> the results are not recognized as xml.
> 
>    My header contains:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <result>
> 
>    My template contains:
> 
> <place>
>   ...
> </place>
> 
>    My footer contains:
> 
> </results>
> 
>    Any advice or guidance would be much appreciated.
> 
> Cheers,
> Tricia
> 



More information about the mapserver-users mailing list