W3C home > Mailing lists > Public > public-html-xml@w3.org > January 2011

Re: Detecting XHTML

From: Kurt Cagle <kurt.cagle@gmail.com>
Date: Tue, 4 Jan 2011 18:38:25 -0500
Message-ID: <AANLkTikzA-GqVSUC8-opZwpjrF8fVxJwvuS0ovWy5osa@mail.gmail.com>
To: David Carlisle <davidc@nag.co.uk>
Cc: public-html-xml@w3.org

Thanks for that. In an XML context, this would be handled with an XSLT
transformation post validation but prior to rendering. In the case where you
have the full DOM, this is a relatively trivial transformation (not simple,
but certainly doable). The challenge I would see would be in the case of
progressive rendering, though again I think Dr. Kay's work there in
streaming XSLT for 3.0 could prove very useful - you could take in the HTML
and when a <table> element is encountered, could process it's <tr> children
within separate templates.

Not saying that this is the best approach, just thinking about how you would
do it in from an XML standpoint.

Kurt Cagle
XML Architect
*Lockheed / US National Archives ERA Project*

On Tue, Jan 4, 2011 at 6:06 PM, David Carlisle <davidc@nag.co.uk> wrote:

> On 04/01/2011 22:39, Kurt Cagle wrote:
>> I'm guessing that the tbody example et al. is particularly significant
>> in the progressive rendering case?
> not necessarily, for example you can style a table by applying a css rule
> to tbody and it should work in text/html whether or not the tbody is
> explicit in the markup. If you changed the html parser so that
> <table><tr><td>aaa</td></tr></table>
> parsed as it does for xhtml, then any number of things would break as the
> tbody element would no longer be in the dom so not usable from css or
> script.
> tbody isn't the only example, as Henri has pointed out in a parallel
> thread, the html rules around force-closing the p element will similarly
> cause even well formed xml documents to have radically different parse trees
> when parsed as HTML. I may have disagreed with Henri over some edge cases
> with new (to html) elements where I think there could have been less
> differences, but I even I wouldn't suggest changing the parsing here to be
> xml-like.
> David
Received on Tuesday, 4 January 2011 23:40:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:58:27 UTC