Pavel Hlavnicka wrote:

Sorry I bothered you. One more question (and I do not expect you to tell: "wow, what a nice idea, let's change it!" :) Why mime type wins over the DTD declaration (and even over the <?xml?> pragma)? Isn't the <?xml?> prolog enough to tell, ok, this is a xml file?

In an ideal world, yes. In practice, we have the following:


1)  IE/Windows does not support XML MIME types for rendering.
2)  Therefore sites send XHTML as text/html
3)  Then IE uses the HTML parser.
4)  As a result, 99% of the XHTML on the web (my personal experience
    here, not a scientific study) is not well-formed.

So we would simply fail to parse many major sites if we treated it as XML.. :(

See http://www.hixie.ch/advocacy/xhtml for more analysis of the situation.




Reply via email to