SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 28 of 28
  1. #26
    SitePoint Addict
    Join Date
    Feb 2007
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Divisive Cotton View Post
    Is there any particular reason why Microsoft won't implement XHTML? I mean it's been around for ten years now...
    MS itself says they won't implement the application/xhtml+xml MIME type until they fix their xml rendering engine. No idea when that will be.

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

  2. #27
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Arlen View Post
    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.
    An XML MIME type is required if you want to use XHTML. Served as text/html it is HTML (with syntax errors in it). Yes, serving XHTML markup as HTML is 'allowed', although W3C says you should serve it as XML. But you need to understand that you are not using XHTML at all if you serve it as text/html. It only looks that way.

    Quote Originally Posted by Arlen View Post
    MS supports XHTML when served with mime type text/html
    In other words, MS supports HTML and has parser bugs and clever-enough error handling to cope with XHTML markup that claims to be HTML.

    Quote Originally Posted by Arlen View Post
    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.
    That statement is slightly misleading, since you're not entering any area of XML whatsoever if you serve anything as text/html. So speaking about 'other' areas of XML is misleading.

    Quote Originally Posted by Arlen View Post
    Why do I use XHTML? Like I said, the language is more rigorous
    No, it's not. The rules are more consistent, but XHTML 1.0 and HTML 4.01 are precisely equally 'rigorous' (if you compare the equivalent DTDs). The difference is that HTML parsers are usually forgiving, while XML parsers are required to be draconian.

    Quote Originally Posted by Arlen View Post
    and creates sites more easily migrated to the correct mime type when supported.
    A well-written HTML 4.01 Strict document takes only seconds longer to migrate to XHTML 1.1 or any later XHTML version than does a well-written XHTML 1.0 Strict document. Especially if the latter is compliant to Appendix C in order to be served as HTML.

    Quote Originally Posted by Arlen View Post
    No real objective reason to prefer either XHTML or HTML, and there probably won't be for a half decade or so.
    Oh, but there is! If you use XHTML you're blocking out 70-90% of the surfing population (i.e., those that use IE or older browsers). If you're serving your markup as text/html, you should state that you don't think there's any real objective reason to prefer invalid HTML or HTML.

    Quote Originally Posted by Arlen View Post
    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.
    It seems you are the one spreading FUD here, implying that HTML is 'tag soup'. HTML 4.01 and XHTML 1.0 are semantically equivalent; the latter is merely a reformulation of the former as an application of XML 1.0. If the XHTML is served as text/html the two are identical.

    Quote Originally Posted by Arlen View Post
    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 agree. It's far more important to comply to a Strict DTD instead of a Transitional one. If you want to go through the extra bother of using XHTML 1.0 Strict instead of HTML 4.01 Strict, even though it gives no practical benefits whatsoever, that's entirely up to you.
    Birnam wood is come to Dunsinane

  3. #28
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    I remember when I first began writing XHTML instead of HTML. I felt manly to be using the latest and greatest, and using all of those self-closing tag techniques gave me a sense of purpose and meaning, that somehow XHTML was really going somewhere.

    Now-a-days though, I have learned more and realise what AutisticCuckoo has brought up. When dealing with IE, the XHTML is in reality just badly coded HTML. And I ask myself, do I really want to write XHTML having to look over my shoulder at IE all the time and be forced to make compatibility changes just so that IE can understand it, or do I want to write strictly coded HTML that can be properly used anywhere, no matter which browser is being used.

    The decisive answer to that question then becomes painfully obvious.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •