XHTML Version 1.1

There's also another version of XHTML available, version 1.1. This version is in W3C recommendation form. You can find the current version of XHTML 1.1 at www.w3.org/TR/xhtml11.

XHTML 1.1 is a strict version of XHTML, and it's clear that the W3C wants to wean HTML authors from their loose ways into writing very tight XML. How far those HTML authors will follow is yet to be determined.

XHTML 1.1 removes all the elements and attributes deprecated in HTML 4.0, and a few more as well.

<APPLET> Versus <OBJECT>

There's another interesting thing going on in XHTML 1.1: The W3C has long said that it wants to replace <APPLET> and other elements with the Microsoft-supported <OBJECT> element. However, and surprisingly, <OBJECT> is missing from XHTML 1.1. And, surprise, the <APPLET> element is back.

XHTML 1.1 is so far ahead of the pack that many features that today's HTML authors and browsers use aren't supported there at all. So, I'm going to stick to XHTML 1.0 transitional in the examples in this chapter and the next one. However, I'll also indicate which elements and attributes are supported by what versions of XHTML, including XHTML 1.1, throughout these chapters.

The Differences Between XHTML 1.0 and XHTML 1.1

You can find the differences between XHTML 1.0 and XHTML 1.1 at www.w3.org/TR/xhtml11/changes.html#a_changes.

When you want to use XHTML 1.1, here's the <!DOCTYPE> element you should use (there's only in XHTML 1.1 DTD, not three as in XHTML 1.0):

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"       "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 

Another big difference between XHTML 1.1 and XHTML 1.0 goes beyond the support offered for various elements and attributes. XHTML is designed to be modular. In practice, that means that the XHTML 1.1 DTD is actually relatively short. It's a driver DTD, which inserts various other DTDs as modules. The benefit of modular DTDs is that you can omit the modules that your application doesn't support.

For example, if you're supporting XHTML 1.1 on a nonstandard device such as a PDA or even a cell phone or pager (the W3C has all kinds of big ideas for the future), you might not be able to support everything, such as tables or hyperlinks. With XHTML 1.1, all you need to do is omit the DTD modules corresponding to tables and hyperlinks (several modules are marked as required in the XHTML 1.1 DTD, and those cannot be omitted).



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net