[Bug 8268] XMLHttpRequest fails for documents with named entities due to doctype

http://www.w3.org/Bugs/Public/show_bug.cgi?id=8268





--- Comment #4 from Henri Sivonen <hsivonen@iki.fi>  2009-11-12 15:35:20 ---
(In reply to comment #3)
> (In reply to comment #2)
> > The XHTML 1.0 doctypes are conforming in HTML5 (even in text/html), so you
> > could use the XHTML 1.0 Strict or XHTML 1.0 Transitional doctype and still
> > validate stuff like <video> as HTML5.
> 
> AFAICT only Strict is conforming, not Transitional, right?  I assume the idea
> is to trigger full standards mode.
> 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#obsolete-permitted-doctype

Oops. You are right.

> > Considering that the XHTML 1.0 doctypes are already valid, I'm not convinced
> > that removing the advertisement of the shorter doctype is that right thing on
> > balance, since for your situation to occur, you must have mostly successfully
> > have served polyglotish content to begin with, and that's so hard that it's
> > unlikely that many other code bases have succeeded in it.
> 
> Apparently this is harder than I thought, yes.  So the resolution is that any
> HTML5 document that wants to work with XHR either has to raise a validator
> warning (due to obsolete but conforming doctype) or not use named entities? 

Those options seem sensible.

> Or
> would it be a good idea to make XHTML1 Strict (say) conforming and not
> obsolete, but say authors shouldn't use it unless they want to be compatible
> with named entities in XML? 

How would you feel if Validator.nu issued a discretionary warning (warning put
in at the discretion of the validator developer as opposed to the spec) saying
that the doctype shouldn't be used unless you want entity compat with XHR?

Mediawiki is doing something unusual here. I don't see why you should have zero
warnings if you are doing something unusual even if conforming if the warnings
might be educational to someone else (specifically, authors who are unaware
that there's now a doctype that's memorable so they can stop copying and
pasting lengthy incantations).

> Presumably XHR with named entities can't be more
> marginal a use-case than "HTML generators that cannot output HTML markup with
> the short DOCTYPE '<!DOCTYPE HTML>'".

Replacing about:legacy-compat with the XHTML 1.0 Strict doctype would fail to
highlight that doctype is permitted only for legacy tools.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 12 November 2009 15:35:23 UTC