On 3/4/10 2:50 PM, Malthe Borch wrote: > On 4 March 2010 22:45, Kevin J. Kalupson <z...@kevinkal.com> wrote: >> In that case, there should be macro explicitly containing the doctype >> and other wanted headers. > > Yes, but that's unfortunately impossible. > not impossible: standard_template.pt --------------------- <metal:block metal:define-macro="xml_head"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> </metal:block> <html metal:define-macro="page"> <head> <title tal:content="template/title">The Title</title> </head> <body> Hey - this is a test. </body> </html>
test.pt ------- <metal:block metal:use-macro="here/standard_template.pt/macros/xml_head"/> <metal:block metal:use-macro="here/standard_template.pt/macros/page" /> localhost:8080/test.pt - rendered source ---------------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <title></title> </head> <body> Hey - this is a test. </body> </html >> I don't think it's a syntax issue, I think it's a behavioral issue. I >> think the 1.1 branch exhibits broken behavior. > > But keep in mind that we're mimicking ``zope.pagetemplate``. Most > people expect high corcordance. > > I just don't know about this. There's a work-around for you though: if > you don't define the macro as the root node, then you won't get the > doctype. > > \malthe -Kevin _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev