[Zope-CMF] Returning XML documents from CMF

Marc van Grootel (Mendez Nederland) Marc.van.Grootel@mendez.nl
Wed, 18 Jul 2001 16:20:39 +0200


Hi Jon,

Good thinking. RSS outputs the following at the top:

  Content-type: text/xml

  <?xml version="1.0"?>

This works.

I'm still learning so I did not know this before i was
under the impression that this line 

  <dtml-call REQUEST.set('Content-Type','text/xml')> 

was needed to get XML but by looking at the HTTP headers I found that 
this call doesn't work in regular Zope either. Zope just does it's own 
mime-type mapping based on the extension, is that correct? However, the 
solution at the top DOES work and seems to override the mapping based on
the extension. I'm sure I found this dtml-call trick somewhere but it does 
not work. I always had document names ending with .xml which set
the content-type automagically so I never noticed that it didn't work.

I guess i have to study some of the docs on this ;)

Thanks

--Marc

> -----Original Message-----
> From: Jon Edwards [mailto:jon@pcgs.freeserve.co.uk]
> Sent: Wednesday, July 18, 2001 3:22 PM
> To: Zope-Cmf
> Cc: Marc van Grootel (Mendez Nederland)
> Subject: [Zope-CMF] Returning XML documents from CMF 
> 
> 
> Marc,
> 
> It might be worth looking at the way the RSS and rssBody methods (in
> portal_skins/generic) do it?
> 
> Cheers, Jon
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://www.zope.org/Products/PTK/Tracker for bug reports 
> and feature requests
>