Results 1 to 25 of 28
Thread: Discussion subject XHTML
Dec 8, 2008, 09:08 #25
- Join Date
- Feb 2007
- 0 Post(s)
- 0 Thread(s)
That having been said, what we're really discussing here isn't using XHTML at all. Although misnamed in the subject, the discussion here is about serving XHTML files with the xhtml+xml mime type (required for compliance with XHTML versions 1.1 and higher, but not required for XHTML 1.0) and using other XML-based add-ons to XHTML.
MS supports XHTML when served with mime type text/html (and if you're worried about standards compliance, here's the W3C's words on doing that) so as long as you're not interested in expanding into other areas of XML, there's no real problem caused by writing XHTML 1.0 and serving it under the html mime type to explorer. (Yes I read felgall's js comment earlier, but I've been following this procedure for quite some time without it causing a single issue with js.)
Why do I use XHTML? Like I said, the language is more rigorous, so it helps develop and reinforce good personal coding standards, and creates sites more easily migrated to the correct mime type when supported. It doesn't enable easier migration to higher versions of XHTML, because the XHTML committee has already served notice that they don't care about backward compatibility between versions; see the img tag among others for details of that.
My own bottom line: No real objective reason to prefer either XHTML or HTML, and there probably won't be for a half decade or so. If the WHAT-WG ever gets the next version of tag soup (AKA HTML5) off the dime we may have something to discuss. Until then the question is simply FUD.
If you're truly concerned about the future, make sure your code is clean, because that's going to be the biggest issue going forward. I've known a lot of folks who have carried over sloppy coding habits into XHTML, served it as text/html and seen it work fine, then later switched to xhtml+xml and seen it break. They blamed XHTML for the wreckage almost invariably, when the real culprit was a PEBCAK (Problem Exists Between Chair And Keyboard).