ietf-xml-mime
[Top] [All Lists]

text/xhtml+xml vs. application/xhtml+xml

2000-10-17 10:48:36
Mark, I would appreciate if the HTML WG could provide a little more context
on their thinking, perhaps by adding to discussion to the eventual XHTML
MIME registration.

First, I'm not convinced that text/ is the correct top-level type.  Section
3 of <http://www.imc.org/draft-murata-xml> says:

   If an XML document -- that is, the unprocessed, source XML document
   -- is readable by casual users, text/xml is preferable to
   application/xml. MIME user agents (and web user agents) that do not
   have explicit support for text/xml will treat it as text/plain, for
   example, by displaying the XML entity as plain text. Application/xml
   is preferable when the XML MIME entity is unreadable by casual
   users. Similarly, text/xml-external-parsed-entity is preferable when
   an external parsed entity is readable by casual users, but
   application/xml-external-parsed-entity is preferable when a plain
   text display is inappropriate.

      NOTE: Users are in general not used to text containing tags such
      as <price>, and often find such tags quite disorienting or
      annoying. If one is not sure, the conservative principle would
      suggest using application/* instead of text/* so as not to put
      information in front of users that they will quite likely not
      understand.

Using the canonical mother example, I know that my mother, who does not mind
looking at <http://www.dankohn.com/>, would be upset if her mailer revealed
the ugly innards:

   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
   <html
    xmlns="http://www.w3.org/1999/xhtml";
    xml:lang="en">
     <head>
       <meta
        name="generator"
        content="HTML Tidy, see www.w3.org" />
       <meta
        http-equiv="Content-Type"
        content="text/html; charset=utf-8" />
       <title>
         Dan Kohn's Home Page
       </title>
       ...

It seems like application/* is thus the safer bet.  Moreover, section 2.11
of <http://www.w3.org/TR/REC-xml> already standardizes end-of-line handling,
so the canonicalization of line endings that text/* supports does not seem
necessary.

Also, I would like to see some detailed discussion of when to use
application/xhtml+xml and when to use text/html.  This seems like an upward
compatibility challenge of exceeding subtlety, and may deserve more
attention than it received in your IRC conversation.

Thanks in advance for any insight you can provide into your and the WG's
thinking.

                - dan
--
Dan Kohn <mailto:dan(_at_)dankohn(_dot_)com>
<http://www.dankohn.com>  <tel:+1-650-327-2600>