XHTML Media Types - Second Edition Appendix B - missing "lang" attribute for XHTML 1.0 served as "text/html"

In the example document in Appendix B (to demonstrate rule A.7 as it
applies to XHTML 1.0 served as "text/html"), the "lang" attribute is
omitted:

http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/#a_example

Currently, it reads:

----
<!-- use lang and xml:lang if your language supports it - A.7 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
----

Also, I suggest re-ordering the examples provided in Appendix B
because the text starts with "The following is..." only to be
interrupted by the example for XHTML 1.1; readers quickly skimming the
text may be confused, as I was when I first read the example. I
suggest moving the example for XHTML 1.1 to follow the example for 1.0
(and add the "lang" attribute to the html element, which I have
included):

-----
Appendix B. An Example Document

The following is an example document that adopts the conventions
described in Appendix A to ensure its portability among XHTML and HTML
user agents. This example uses XHTML 1.0 Strict.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www..w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- use lang and xml:lang if your language supports it - A.7 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Example Portable XHTML</title>
  <!-- Embed encoding when you can't set it from the server - A.9 -->
  <meta http-equiv="Content-Type"
        content="text/html; charset=utf-8" />

[...]

</body>
</html>

It could also have used XHTML 1.1. In that case the top of the
document would look like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
                      "http://www..w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

In this case, note that the lang attribute is not used on the html
element. XHTML 1.1 does not support the lang attribute.
----

Thank you all for your work in producing this document because I think
the concept of media types is greatly misunderstood.

Regards,
David

---------------------------------
David Lantner
http://lantner.net/david/

Received on Tuesday, 12 May 2009 06:57:38 UTC