HTML and XHTML mismatches

I am writing this so it gets in the archives, as it is a question I get asked
from time to time.

If you take a file in XHTML, and edit it with an HTML editor, you may create
something that is not valid XHTML. Amaya, behaving as required by the XML
specification, warns that there is a problem, says something about what and
where it is, and stops processing.

If you had loaded this as an HTML file, there would be no problem. You could
save it back as an XHTML file perfectly well.

For example, looking at the source, removing the namespace attribute from the
html element and synchronising seems to do the trick.

Do the team have any more explanation of how this happens, and what other
factors (MIME type? others?) come into play?

Charles McCN

-- 
Charles McCathieNevile    http://www.w3.org/People/Charles  phone: +61 409 134 136
W3C Web Accessibility Initiative     http://www.w3.org/WAI    fax: +1 617 258 5999
Location: 21 Mitchell street FOOTSCRAY Vic 3011, Australia
(or W3C INRIA, Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex, France)

Received on Tuesday, 20 March 2001 06:00:01 UTC