Re: let authors choose text/html or application/xhtml+xml (detailed review of section 1. Introduction)

On 9/3/07, Thomas Broyer <t.broyer@gmail.com> wrote:
>
> 2007/9/3, Michael A. Puls II:
> >
> > XHTML5 documents that also conform to HTML5 should be served with an
> > xml mime type, but may be served as text/html.
>
> Not necessarily, because there will be differences in the DOM so
> stylesheets and scripts might very well fail if you serve an XHTML5
> document as text/html.

That shouldn't be a concern if the document is only ever authored and
served as text/html.

If it's served as both (to different clients for example), then yes,
that's a concern. However, that's up to the author to handle to make
sure the document behaves and looks the same whether it's served as
xml or text/html. (as in, don't use any markup + js + css that would
change behavior when switching mime type between xml and text/html.
I'm not sure what wording would be best to describe that requirement
though or if it'd even help.

On the other hand, we could keep the MUST requirement for XHTML
documents and just better describe what an XHTML document (as far as
the spec is concerned) is.

For example:

Since a document using xhtml markup isn't treated as xhtml by clients
unless it's served with an xml mime type, we could define what an
xhtml document is a little better. That way, the definition of an
xhtml document matches the behavior in clients that we all have to go
by anyway.

An xhtml document isn't (as far as the spec is concerned) a document
that uses xhtml markup (xml markup with the html namespace). It's a
document that uses xml markup with the html namespace that is served
with an xml mime type (or the equivalent for local files).

A document (as far as the spec is concerned) using xhtml markup (as in
the small xmlisms that are allowed in html5) that is served as
text/html is not an xhtml document. It's an html document and
therefore, the MUST requirement for XHTML documents is not a concern
here because it's not an XHTML document.

Basically, looking like a duck is not enough to make it a duck. So,
let's not call it a duck unless other requirements are met.

The spec already kind of says theses things. Maybe it could be clarified though.

-- 
Michael

Received on Monday, 3 September 2007 10:04:33 UTC