XHTML & application/xml?

U

UKuser

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.
 
M

Martin Honnen

UKuser said:
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.
 
U

UKuser

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.

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

Martin Honnen

UKuser said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,839
Latest member
MartinaBur

Latest Threads

Top