[Zope-dev] HTTP HEADER

Martijn Pieters mj@digicool.com
Sun, 13 Feb 2000 05:42:32 -0500


From: Sin Hang Kin [mailto:iekentsin@infoez.com.mo]
> 
> I am trying to make the following with XMLDocument:
> 
> Extract a branch of the xml-tree and adding a xml header with 
> apropriate xsl
> which the browser which can recogniz xml can use the xsl to render the
> branch of the tree.
> 
> I have made a method which have :
> 
> <?xml version="1.0"?>
> <dtml-var "toXML()">
> 
> however, Zope send
> 
> <html><head>
> <base href="http://.....
> 
> before the method's output.
> 
> Can I ask Zope not to send this?

Yes, by setting the content-type to text/xml, or anything that is not
text/html.

Add the following line to your code somewhere:

  <dtml-call "RESPONSE.setHeader('content-type', 'text/xml')">

-- 
Martijn Pieters, Software Engineer 
| Digital Creations http://www.digicool.com 
| Creators of Zope      http://www.zope.org 
| mailto:mj@digicool.com       ICQ: 4532236
| PGP:
http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 
-------------------------------------------