On 10/26/05, Floyd May <[EMAIL PROTECTED]> wrote:
> It appears as though this problem is due to the content-type being set
> inappropriately (probably text/html). I'm attempting to render XML,
> but each of the templates only contains a piece of my final output XML
> file; therefore, I don't have the '<?xml ... ?>' header in the file.
> From a perusal of the source for FSPageTemplate, this appears to be
> the only way to get the Content-Type set to 'text/xml'. Basically,
Unfortunately, that's true for the current code. Julien Anguenot and
I started working on this problem (along with some other aspects of
the XML vs. HTML behavior) based on the Zope 3 implementation for page
templates. The work isn't done yet, though the aspect you're
interested in is pretty straightforward.
That's only for the Zope 3 version of the code, however. For now,
your best bet may be to subclass the PageTemplateFile class (or
whichever derived class of that that's relevant to you) and override
the _cook_check() method to do what you need it to do. If you're
using a file-system view, you likely need to arrange for your new
class to be used for some new filename extension; I'm not sure how to
arrange for that.
Fred L. Drake, Jr. <fdrake at gmail.com>
"Society attacks early, when the individual is helpless." --B.F. Skinner
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -