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

Křištof Želechovski giecrilj at stegny.2a.pl
Tue May 13 11:52:50 PDT 2008


I am not sure I understand.  
If the document is served as application/xml, should the user agent treat is
as XHTML if appropriate?
OTOH, if the document is served as text/xml, should the user agent obey the
stylesheet processing instruction?
(IIRC, FF ignores the stylesheet if it detects html in a local XML file, as
if served as application/xml according to the recipe above, whereas IE obeys
the inferred document type text/xml rigorously without paying attention to
content.)
Chris

-----Original Message-----
From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Michael A. Puls II
Sent: Tuesday, May 13, 2008 12:25 PM
To: whatwg at whatwg.org
Subject: [whatwg] Differences between application/xhtml+xml
andapplication/xml

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