Re: [xml] htmlHandleOmittedElem bug

Date view Thread view Subject view Author view

From: TOM (ptittom@free.fr)
Date: Tue Jan 09 2001 - 14:25:15 EST


Le 09/01/01 19:30:54, Jonas Borgström a écrit :
> <html>
> <body>
> <span>foo</span> bar
> </body>
> </html>
[...]
> The correct way for gnome-xml to fix the broken html is like this:
>
> <html>
> <body>
> <p>
> <span>foo</span>
> bar
> </p>
> </body>
> </html>

Yes, if we consider HTML Strict, but the first sample is valid HTML
Transitional.

> I think the correct way of doing it when the htmlCheckParagraph detects
> this is to put a <p> element between the <body> and its first child.
> because gnome-xml can't know if the elements are inline or not (can
> be changed through css).

No, the choice of adding a P element must be made according to the DTD, not
a CSS property, and the DTD for HTML 4.0 says SPAN is an %inline; element.
This %inline; doesn't have any link with the CSS 'display' property value
'inline' other than default presentation for all HTML %inline; element is
the same as if they would have had a CSS property 'display: inline'. The
first one (%inline;) tells which elements can be children of an element in
the DTD, the second ('display: inline') tells the UA how to *show* the
element's content.
See <http://www.w3.org/TR/html4/struct/global.html#block-inline>

> What do you think?

if we consider HTML Strict, we should add a P over every sequence of
%inline; child of BODY. If we consider HTML Transitional, we can keep
%inline; under BODY.

Tom.

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Jan 09 2001 - 14:44:13 EST