XML Template

Steve Lime steve.lime at DNR.STATE.MN.US
Tue Dec 13 21:24:06 EST 2005


There is a bug for this and I have started the fix and hope to finish tomorrow sometime during the day. The version writing would disappear altogether and be replaced with a template substitution. ([version] already exists since 4.4).

Steve

>>> Jachym Cepicky <jachym.cepicky at CENTRUM.CZ> 12/13/05 2:21 PM >>>
hallo,

I had the same problem.. if you did not solve it some better way, try to
open the file mapserv.c and rewrite the lines

   msIO_printf("Content-type: text/html%c%c", 10, 10); /* write MIME header */
   msIO_printf("<!-- %s -->\n", msGetVersion());

to

   /* I would like xml, please */
   msIO_printf("Content-type: text/xml%c%c", 10, 10); /* write MIME header */
   /* msIO_printf("Content-type: text/html%c%c", 10, 10);
   msIO_printf("<!-- %s -->\n", msGetVersion());*/

and recompile

this is the "quick and dirty way", how to force mapserver to produce
correct xml headers without comments.

To Steve Lime: Sorry, I'm not programer - I know, this is not clean
solving of that problem.  But this is the way, we would
like mapserver handles templates. I would suggest some CONTENTTYPE
option for mapfile. And remove the msGetVersion() printing (at least for
text/xml type).

Jachym

On Thu, Nov 03, 2005 at 05:24:46PM -0500, Tricia Williams wrote:
> 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

-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
LDF MZLU v Brně
Zemědělská 3
613 00 Brno
e-mail: xcepicky at node.mendelu.cz
URL:    http://mapserver.mendelu.cz
Tel.:   +420 545 134 514



More information about the mapserver-users mailing list