Personal tools
You are here: Home Lists ZPUG DC List Archives 2005 2005-12 ZMI doesn't like XML Page Template with TAL / john.kavanagh@mdafederal.com
Navigation
Log in


Forgot your password?
New user?
Mailing Lists
You can read our ZPUGDC mailing list archives online.
You can subscribe to our mailing list:
Book Review

The Definitive Guide to Plone

Reviewer: joel
 

ZMI doesn't like XML Page Template with TAL / john.kavanagh@mdafederal.com

ZMI doesn't like XML Page Template with TAL
john.kavanagh(at)mdafederal.com
2005-12-13 14:00:25 [ FULL ]
Hello, ZPUGDC

We have a Page Template with a single line of code <div 
tal:replace="structure python:here.externalmethod"/> that is replaced 
with well-formed XML data.

If the Page Template 'content_type' is not set to 'text/xml', then XML 
parsers will not recognize the page as a legitimate XML document. Since 
the default Page Template 'content_type' metadata is 'text/html' we must 
change it to 'text/xml'.

Bizarely, this content_type change works until someone uses the ZMI.

Then the Zope parser tests the Page Template and throws an XML parser 
error because the HTML/TAL code isn't what it expects. It isn't smart 
enough to realize that the TAL code is being replaced with XML upon 
execution.

What the heck should we do to prevent Zope from test XML parsing the 
Page Template?
[...]

Powered by Plone, the Open Source Content Management System

This site conforms to the following standards: