[Zope] METAL and DOCTYPE

Geir Bækholt Geir Bækholt <geirh@funcom.com>
Mon, 20 Jan 2003 10:07:37 +0100


on or about, Sunday, January 19, 2003, we have reason to believe that Fred =
Yankowski wrote
something along the lines of :

> On Sun, Jan 19, 2003 at 07:20:14PM +0100, Dieter Maurer wrote:
>>   There has been a ZPT feature request to declare the complete
>>   template as a macro, including the doctype declaration.
>>   However, I fear, it has never been implemented.

I> Just to expand on this a bit, the upshot is that each ZPT instance
> needs to provide its own explicit DOCTYPE declaration since there is
> no way (currently) to include a DOCTYPE via macros.

> At least, that's my experience and my interpretation of what Dieter
> said.

You can easily use included doctypes with the current implementation.
As you may use properly namespaced roll-your-own xml-elements in ZPTs, there
is really no need to tie your macros to the html-element...

<metal:page use-macro=3D"here/standard_template.pt/macros/page">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org=
/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml"
      xmlns:tal=3D"http://xml.zope.org/namespaces/tal"
      xmlns:metal=3D"http://xml.zope.org/namespaces/metal"
      lang=3D"en" xml:lang=3D"en">
<head>
<title>etc..</title>
</head>
  etc...


and remember to close the page-element aswell..
</metal:page>



--=20
Geir B=E6kholt        geir@funcom.com
Web Application/HCI-developer
Product Operations
Funcom Oslo