When I use validator.w3c.org on my page it complains that no DOCTYPE is set. But the PageTemplate (metal master) looks like this:: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html metal:define-macro="standard" tal:define="dummy python:request.RESPONSE.setHeader('Content-Type','text/html;; charset=iso-8859-1');dummy here/StopCache"> <head> .... Why does it not recognize my DOCTYPE?
When I use validator.w3c.org on my page it complains that no DOCTYPE is set.
But the PageTemplate (metal master) looks like this::
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Because it lacks the DTD. Use the following: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> Reference: http://www.alistapart.com/stories/doctype/ HTH, fonso
At 17:06 2003-01-19 +0100, Afonso Fernandez Nogueira wrote:
When I use validator.w3c.org on my page it complains that no DOCTYPE is set.
But the PageTemplate (metal master) looks like this::
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Because it lacks the DTD. Use the following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Thank you. Added that now. Peter
Reference: http://www.alistapart.com/stories/doctype/
HTH, fonso
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Peter Bengtsson wrote at 2003-1-19 12:29 +0000:
When I use validator.w3c.org on my page it complains that no DOCTYPE is set.
But the PageTemplate (metal master) looks like this::
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html metal:define-macro="standard" tal:define="dummy python:request.RESPONSE.setHeader('Content-Type','text/html;; charset=iso-8859-1');dummy here/StopCache"> <head> ....
Why does it not recognize my DOCTYPE? I expect the validator complains for a page that has been built using the macro, right?
In this case, you use from your template only the defined macro and this does not contain the doctype declaration. 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. Dieter
On Sun, Jan 19, 2003 at 07:20:14PM +0100, Dieter Maurer wrote:
In this case, you use from your template only the defined macro and this does not contain the doctype declaration.
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.
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. -- Fred Yankowski fred@ontosys.com tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA
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="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="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope.org/namespaces/tal" xmlns:metal="http://xml.zope.org/namespaces/metal" lang="en" xml:lang="en"> <head> <title>etc..</title> </head> etc... and remember to close the page-element aswell.. </metal:page> -- Geir Bækholt geir@funcom.com Web Application/HCI-developer Product Operations Funcom Oslo
On Mon, Jan 20, 2003 at 10:07:37AM +0100, Geir B?kholt wrote:
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...
Aha, you're right, and that's the trick. Actually, I'm surprised that ZPT allows a DOCTYPE declaration appear in the content of any element; is that well-formed XML?
<metal:page use-macro="here/standard_template.pt/macros/page">
Shouldn't that be a define-macro attribute (and appropriate value) in that metal:page tag, rather than use-macro? -- Fred Yankowski fred@ontosys.com tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA
Hello Fred, Monday, January 20, 2003, 6:01:49 PM, you wrote:
Aha, you're right, and that's the trick. Actually, I'm surprised that ZPT allows a DOCTYPE declaration appear in the content of any element; is that well-formed XML?
( http://zope.nipltd.com/public/lists/zope-archive.nsf/ByKey/2F2087986BB1E751 ) ZPTs do not have to be well-formed XML if the content-type is not text/xml ..
<metal:page use-macro="here/standard_template.pt/macros/page">
Shouldn't that be a define-macro attribute (and appropriate value) in that metal:page tag, rather than use-macro?
yes, could be that aswell.. My example is from a ZPT *using* the macro. You will of course use define-macro in the page-template defining it... ;) -- Geir Bækholt geir@funcom.com Tools/HCI-developer Tools/Billing - Product Operations Funcom Oslo
participants (6)
-
Afonso Fernandez Nogueira -
Dieter Maurer -
Fred Yankowski -
Geir Bækholt -
Geir B�kholt -
Peter Bengtsson