Started reading this thread and at the end it became very very confusing.
Can anyone pl post a small example of a TRUE xHTML 1.1 document (application/xhtml+xml) and another of a TRUE XML based document (application/xhtml+xml) ?
I thought this was a true xHTML 1.1 doc but it seems it isn't.
HTML Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml;"/>
</head>
<body>
<div>
Text
</div>
</body>
</html>
The media type (a.k.a. content type, a.k.a. MIME type)
must be sent as a proper HTTP header by the server. The user agent needs to know the content type
before it receives a single byte of the document.
And so I inserted this at the beginning.
PHP Code:
<?php
header('Content-type: application/xhtml+xml');
header("Cache-Control: must-revalidate");
?>
And it works (displays) in IE7 and FF2.
I changed
HTML Code:
<div>Text</div>
to
HTML Code:
<div>Text<div>
which is wrong and FF shows
Code:
XML Parsing Error: mismatched tag. Expected: </div>.
Location: http://localhost/test/test-2.htm
Line Number 12, Column 3:</body>
--^
This wont come up if header('Content-type: application/xhtml+xml'); isnt given.
Ofcourse IE7 isn't showing any error, but it doesn't seem to be treating it like generic XML.
Edit: I just wanted to know what error are we supposed to be expecting in IE ? Or has version 7 worked things out ?

Thanx
Bookmarks