When Zope parses text/html elements, instead of XML (xhtml and the like) uses a different parser. That is, not an XML parser, but rather an HTML parser like the ones used by browser, more relaxed, which allows for unclosed tags and the liks.
BUT…
there’s always a but. In HTML, technically speaking, not all combinations of tags are allowed, even if browsers permit it. E.g., a span cannot contain a div. So, zope too complains about this fact. But how does it complain?
Page Template Diagnostics
Compilation failed
zope.tal.htmltalparser.NestingError: Open tags <html>, <body>, <div>, <div>
do not match close tag </span>, at line 105, column 5
Now, please, tell me, why the fuck you told me about not matching tags when the problem is that the document in not valid against given DTD?!?! So, I lost a whole afternoon after this wrong error message, before been enlightened by the documentation. For sure, I didn’t mind looking at it, since the error message did state quite clearly what the problem was.
One more notes about designing programs in the future. Tell a lots of things when an error come out but, above all, tell the REAL error, not some approximate, wrong information. This is much worse that a laconic error message.
