[Bug 1500] XHTML-sent-as-text/html is parsed as XML

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





------- Comment #2 from ian@hixie.ch  2006-08-15 05:50 -------
(In reply to comment #1)
> Could you give more precisions of what you mean by "treat as HTML" in the
> context of formal DTD validation, which is what the validator does?

I mean handle as described by the XML spec instead of handled as described by
the SGML spec.


> Any normative reference would be more appreciated. I don't think it's a good
> idea to base the validator's behavior on a message in a w3c mailing-list.

The only normative reference is the HTML5 working draft:

   http://www.whatwg.org/specs/web-apps/current-work/#authors-using-html

You'll never see a normative reference from the ex-HTML working group, they
never update their errata. The best you'll see from them is the e-mail I posted
above.


> > I would like to see the validator reject any XHTML-sent-as-text/html as being of
> > the wrong MIME type.
> 
> I do not see a direct link between the rest of your comment and the conclusion
> that XHTML-sent-as-text/html should be plain and simply rejected. Are you
> suggesting that it should "be treated as HTML", "checked against appendix C
> rules", or "rejected". Please precise your request.

Any of those three options would be fine by me.


> Until we have the unicorn tool ready for prime time, my proposed solution is
> that whenever the validator finds an XHTML 1.0 doctype document served as
> text/html, it adds a note to its output encourageing the author to check their
> documents against the appC checker. 
> 
> Would that be an acceptable solution?

So long as it doesn't make the author think that what they're doing is ok, I'll
be happy.


> Also, please feel free to send in test cases, as well as patch proposals, which
> would help us treat your request quickly.

See bug 14, where Terje cited a testcase that I wrote. The two testcases that I
wrote for this were:

   http://damowmow.com/playground/html-not-xml.html
   http://damowmow.com/playground/html-not-xml-2.html

Some other testcases would be http://www.w3.org/TR/xhtml2/ or
http://www.w3.org/People/olivier/ for example. Both of those should be flagged
as being incorrectly labelled, as they are XHTML but are sent as text/html.

Received on Tuesday, 15 August 2006 05:50:23 UTC