XHTML & application/xml?

Discussion in 'XML' started by UKuser, Jan 23, 2009.

  1. UKuser

    UKuser Guest

    Can I ask a simple (but maybe stupid) question. Why was the
    application/xhtml+xml MIME type developed and why don't you just serve
    it up as application/xml? It works in most browsers so is surely
    better than text/html.

    Just some thoughts for discussion.
    UKuser, Jan 23, 2009
    #1
    1. Advertising

  2. UKuser wrote:
    > Can I ask a simple (but maybe stupid) question. Why was the
    > application/xhtml+xml MIME type developed and why don't you just serve
    > it up as application/xml? It works in most browsers so is surely
    > better than text/html.


    You first question application/xhtml+xml compared to application/xml.
    Then you compare to text/html. I don't understand what you want to say.
    application/xhtml+xml is for XHTML 1.x documents, text/html for HTML
    documents and for XHTML 1.0 documents following the
    http://www.w3.org/TR/xhtml1/#guidelines guidelines.
    See http://www.w3.org/TR/xhtml-media-types/

    And IE 6/7 do not support rendering XHTML documents served as
    application/xml, they simply display the document tree.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Jan 23, 2009
    #2
    1. Advertising

  3. UKuser

    UKuser Guest

    On Jan 23, 6:02 pm, Martin Honnen <> wrote:
    > UKuser wrote:
    > > Can I ask a simple (but maybe stupid) question. Why was the
    > > application/xhtml+xml MIME type developed and why don't you just serve
    > > it up as application/xml? It works in most browsers so is surely
    > > better than text/html.

    >
    > You first question application/xhtml+xml compared to application/xml.
    > Then you compare to text/html. I don't understand what you want to say.
    > application/xhtml+xml is for XHTML 1.x documents, text/html for HTML
    > documents and for XHTML 1.0 documents following thehttp://www.w3.org/TR/xhtml1/#guidelinesguidelines.
    > Seehttp://www.w3.org/TR/xhtml-media-types/
    >
    > And IE 6/7 do not support rendering XHTML documents served as
    > application/xml, they simply display the document tree.
    >
    > --
    >
    >         Martin Honnen
    >        http://JavaScript.FAQTs.com/


    What i mean is - if XHTML is XML why did they need a new media type?
    UKuser, Jan 31, 2009
    #3
  4. UKuser wrote:

    > What i mean is - if XHTML is XML why did they need a new media type?


    Because you might want to build a special DOM for instance. If you serve
    XHTML as application/xml to Mozilla then Mozilla builds a W3C Core DOM
    only, if you serve as application/xhtml+xml then it builds a Core and
    HTML DOM.
    SVG is XML too nevertheless there is a MIME type for it: image/svg+xml.
    And XSLT is XML too, nevertheless there is a MIME type for it:
    application/xslt+xml


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Feb 2, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    7
    Views:
    866
  2. chronos3d
    Replies:
    9
    Views:
    761
    Andy Dingley
    Dec 5, 2006
  3. Usha2009
    Replies:
    0
    Views:
    1,117
    Usha2009
    Dec 20, 2009
  4. xhtml champs
    Replies:
    0
    Views:
    442
    xhtml champs
    Aug 1, 2011
  5. xhtml champs
    Replies:
    0
    Views:
    1,014
    xhtml champs
    Aug 2, 2011
Loading...

Share This Page