[Zope3-dev] Re: XML header and TAL interpretor
Tonico Strasser
contact_tonico at yahoo.de
Thu Sep 1 05:44:48 EDT 2005
Fred Drake schrieb:
> On 8/31/05, Philipp von Weitershausen <philipp at weitershausen.de> wrote:
>
>>HTML4 mode exists because
>
> ...
>
>>- it enforces some HTML document type (as mentioned before); no idea why
>>it does that
>
>
> I'm just guessing you're referring to its understanding of the allowed
> nesting structures. This is done so that the partial well-formedness
> it requires mixed with the careless infliction of pain commonly
> performed by old-style HTML authors produces as few surprises as
> possible. The only well-formedness it directly enforces is for
> elements that actually have TAL, METAL, and I18N attributes. Whether
> this was the right thing to do is debatable.
>
> Another reason for the HTML mode is that many of the HTML editors
> deployed when we first developed TAL were not generating XHTML, and
> weren't expected to do so in the immediate future. We definately
> wanted page templates to be editable in WYSIWYG-type editors.
And, as long pages are served as text/html they are treated as old-style
HTML by browsers anyway[1].
XHTML pages served as text/html must follow the compatibility
guidelines[2]. E.g. in ZPT HTML mode, elements like <br/> will be
converted to <br /> automagically (with space before the slash). That is
a good thing IMHO.
[1] Serving XHTML 1.0
<http://www.w3.org/International/articles/serving-xhtml/>
[2] HTML Compatibility Guidelines
<http://www.w3.org/TR/xhtml1/#guidelines>
Tonico
More information about the Zope3-dev
mailing list