Sunday, September 07, 2003


Source: dionidium.com

Anne van Kesteren‘s weblog has been home lately to a few fantastic posts related to important differences between XHTML 1.0 Strict and XHTML 1.1. We’re repeating a few here for future reference.

  1. Media Types

    ‘application/xhtml+xml’ SHOULD be used for serving XHTML documents to XHTML user agents. Authors who wish to support both XHTML and HTML user agents MAY utilize content negotiation by serving HTML documents as ‘text/html’ and XHTML documents as ‘application/xhtml+xml’.

    Source

    Further Reading:

  2. Charset

    Therefore, while it is STRONGLY RECOMMENDED to specify an explicit charset parameter through a higher-level protocol, authors SHOULD include the XML declaration (e.g. <?xml version=”1.0” encoding=”EUC-JP”?>).

    Source

    And from the XHTML 1.1 spec:

    XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16.

    Source

    Further Reading:

  3. Stylesheets

    Authors SHOULD explicitly identify the XHTML namespace through the namespace declaration when they serve an XHTML Family document as ‘application/xml’ to facilitate the chance for reliable processing. The XML stylesheet PI SHOULD be used to associate style sheets.

    Source

    Further Reading:

  4. meta http-equiv

    Note that a meta http-equiv statement will not be recognized by XML processors, and authors SHOULD NOT include such a statement in an XHTML document served as ‘application/xml’ (and ‘application/xhtml+xml’ as well for that matter).

    Source

    Jacques Distler asks: “Is it bogus just for setting the content-type and charset, or are all such declarations bogus?” There’s every indication that this rule applies only to setting the content-type and charset.

    Further Reading:

  5. <html> id attribute

    XHTML 1.1 is based on XHTML Modularization and thus disallows <html id=’...’ ...> XHTML 1.0 *Second Edition* had been changed in this respect and allows the html element to have an id attribute.

    Source

    Further Reading:

We’ll add to this list if necessary. For the record, the XHTML 1.1 version of our home page currently meets all the above requirements

[dionidium.com]
7:27:35 PM    trackback []     Articulate []