[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/XML.stx

webmaster@zope.org webmaster@zope.org
Thu, 19 Dec 2002 15:06:52 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/XML.stx#2-11

---------------

    As you can see, DTML is equally adapt at creating XML as it is at
    creating HTML. Simply embed DTML tags among XML tags and you're
    set. The only tricky thing that you may wish to do is to set the
    content-type of the response to *text/xml* which can be done with
    this DTML code::

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

      % Anonymous User - Dec. 19, 2002 3:05 pm:
       I had to do this to get my xsl stylesheet to work. Thanks for the tip. Couldn't this be built in to Zope? By
       adding an XML document type that would automatically set the content type?