[whatwg] Differences between application/xhtml+xml and application/xml

Michael A. Puls II shadow2531 at gmail.com
Tue May 13 03:25:15 PDT 2008


body.xhtml (served as application/xhtml+xml)
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <script>
            window.onload = function() {
                alert(document.body);
            };
        </script>
    </head>
    <body>

    </body>
</html>

body.xml (served as application/xml)
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <script>
            window.onload = function() {
                alert(document.body);
            };
        </script>
    </head>
    <body>

    </body>
</html>

With the latter, Firefox and Opera don't have document.body defined.
Safari does though.

Should Safari match Firefox and Opera or the other way around?

Either way, could you add a little comment in the spec saying that
although application/xml might work, there are catches.

-- 
Michael



More information about the whatwg mailing list