[Zope3-dev] KeyError when accessing ZopeTop
Jeffrey P Shell
jeffrey@cuemedia.com
Mon, 7 Apr 2003 11:07:38 -0600
On Monday, April 7, 2003, at 01:54 AM, Marius Gedminas wrote:
> On Mon, Apr 07, 2003 at 10:46:46AM +0300, Marius Gedminas wrote:
>> When you use TAL/METAL on an XML file, you have to explicitly declare
>> 'tal' and 'metal' namespaces:
>>
>> <?xml version="1.0" encoding="iso-8859-1"?>
>> <html xmlns:tal="http://xml.zope.org/namespaces/tal"
>> xmlns:metal="http://xml.zope.org/namespaces/metal">
>> ...
>
> Unfortunatelly after adding those to zopetop/www/widget_macros.pt I
> get a
> different error:
>
> METALError: macro 'views/standard_macros/logged_user' has
> incompatible
> mode 'xml', at line 37, column 3
>
> Does this mean you cannot mix HTML and XML templates?
You can't mix them in *macros*. By my understanding), macros get
expanded into the template using them on first pass, and then the whole
page is executed as TAL in a second pass. It's very different from
just calling/rendering a template from within a page.
Jeffrey P Shell, jeffrey@cuemedia.com