This isn't to bad mouth IE, but it's so sad to know that even after 5 years or more of IE6, IE7 has no intention of supporting XHTML and I don't think I can wait for IE8 if development takes such a long time. They should also realise that HTML will become obsolete but it would be IE who would be successful in making that happen rather than Web Designers/Developers.
So for this thread, XHTML is not just about changing tags and passing the W3 Validator, in fact the validator has it's limits and we know what limits it has, and we can rectify the situation.
I'm talking about XHTML 1.1, although this does apply to XHTML 1.0 Strict and most definitely would apply to XHTML 2.0 yet this is still in draft.
When designing your site, you should make sure you pass the validator, http://validator.w3.org/detailed.html (you should check most those check boxes for this test).
But that's not all, to be 100% compliant the mime-type that an XHTML document must pass is application/xhtml+xml , in XHTML 1.0 they let it slip by for text/html but only if compatibility was the issue, however you should if you can send application/xhtml+xml to User Agents who can parse XML and as a backup send application/xml or text/xml or as a last and final backup text/html but eventually it will need to be resolved.
I hate trying to fight for standards against people who believe they follow standards, I don't know how many web developers/designers have read nearly every document in W3C, I know I haven't read everyone, but I've read most of them related to HTML, XML, XHTML, CSS, XSL/XSLT and even this effort I have taken to has already surpassed most web designer/developers, so I rather not fight and just let people know that it's how the standards were set.
If you understand this, then you'd probably want to know the advantage of XHTML 1.1 application/xhtml+xml.
I have to say the biggest advantage is "well-formed", it's forced upon you, you make one mistake, it's not going to show your site, it will however show you the XML parser error and will not give you an excuse for making mistakes. This is what I consider the greatest debugging method I have when writing sites, as validators can not give this much power in validating.
Other advantages are you can make your own tags, elements, etc, you are not stuck in using HTML tags no more, you can make tags, styled to how you want, which means you can make better use of CSS if you wanted to as you could create tags for each and every instance, e.g. replacing <p class="copyright">Copyright © 2005.</p> with something that has better meaning for it. e.g. <copyright>Copyright © 2005</copyright>
There are many more advantages, but so much to explain. The main point is we're using data and making the data more appropriate and thus far more effective, especially for Search Engines and searches made.
The biggest disadvantage, the most used browser under windows does not support it. I heard though that same browser on Mac does, is that strange or what?
What we are forced to do with current situations is discover which browsers support it and work with them, we also need to know of other User Agents who definitely support it and work with them, there's so much of making workarounds for it, that I'm quite sick in the slow progress that has been taken to standards, these standards have been out for years now.
Thanks to Mozilla and Opera and the other browsers (Camino, KHTML, etc) who better support standards and know the importance of keeping up to date.
As for sending application/xhtml+xml
We have many methods, but we should not need workarounds, because I find I have to even work on the workaround to perfect it even more so here's the simplistics of getting it working inside PHP. Headers must be sent first, so make it appear at the top/start of your page.
<?php if(isset($_SERVER['HTTP_ACCEPT']))
{
$http_accept = $_SERVER['HTTP_ACCEPT'];
if(stristr($http_accept, 'application/xhtml+xml'))
$mime_type = 'application/xhtml+xml';
elseif(stristr($http_accept, 'application/xml'))
$mime_type = 'application/xml';
elseif(strstr($http_accept, 'text/xml'))
$mime_type = 'text/xml';
}
else
$mime_type = 'text/html';
header('Content-Type: ' . $mime_type);
?>
This is only the basics of it, there's more since validators/search engines etc don't use HTTP_ACCEPT which means we must work on the HTTP_USER_AGENT instead which means sifting through hundreds and that is why I'm sick of not being able to just send application/xhtml+xml without blocking anyone from using it, even though I do feel like blocking IE just cause I can but that's not fair on my viewers.
I may build some test sites for those who want to test their browsers, it would be nice to get some feedback so I might also allow for comments to be made on that site. I will be collecting some information from the use of it however, nothing other than things that will help me better improve on supporting all browsers and then helping you share my results and fixes for it. I'll get back to this when I've completed that part of the site. I will show you plain html files (written in XHTML) that pass W3C, as well as errored html pages (won't validate at W3C) that still display in the browser when they shouldn't (this is because browsers love to fix your problems instead of telling you there's a problem), in xhtml it will be same, but this time instead of the browser fixing your problem, it will tell you! That way you will be a better developer/designer knowing that if you met "well-formed" documents then no doubt you have made the effort to be error free.
Give me time as I'm still trying to see if I can edge on the developer for IE to try for supporting this mime-type yet it seems there's too much to "hack" that it's best to not touch it when it's near releasing.
I understand that people don't want a messy hack, well if they paid attention, he already messed up (if you think this is just a lie, I can point you to sources of him admitting it) and that's why IE requires a rewrite in that department, so messy hack or not, it was already a mess.
There will no doubt be a patch to work with this, I even considered writing one myself, but I felt unofficial patches and the fact that it infringes on something is not worth it, lets just get them to fix the problem themselves. Also to do this patch, it's not an easy task, so don't think I'm making it sound easy, it is indeed a lot of work.
So hopefully this will make you realise that standards are strict as hell, but well worth it.
http://www.w3.org - The only site that has it all. Although you should be quite technical as it's how they speak there and not for those who need basics, basics are left up to us to help you will fully grasp it and we will teach you correctly, or as correct as we understand those documents at W3C.
I do have to say though, it's due to us not following W3C as fully as we can that we messed up in the designing/developing side of things.
Cheers,
MC











