Languages in XHTML

The works cited here are all work in progress and so it is difficult to
talk about them. I'll try, carefully, because I wish to adopt XHTML soon.
My Web site currently declares that each document is English, this way [1]:

  <html lang="en">

Early ISO-HTML used <BODY LANG="en"> if I remember right, and for the
moment seems to have changed to [2]:

  <META CONTENT="en" NAME="DC.LANGUAGE">

Dublin Core's element set is written in English, HTML, and RDF, and as far
as I know declares no language in the document except to explain that it is
possible to say how to use the word "language." [3]

A NOTE by M.T. Carrasco Benitez [4] uses the META element differently than ISO.

  <META HTTP-EQUIV="Content-Language" CONTENT="en">

If I read it right, XHTML 1.0 so far asks:

         "...Use both the lang and xml:lang attributes when
             specifying the language of an element...." [5]

Could someone please tell me if the following example is correct in any or
every respect? Is it an XHTML document, and does it declare language codes
properly? (The DTD and namespace URIs didn't connect yet.)

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/Profiles/xhtml1-strict.dtd" lang="en"
xml:lang="en">
<head>
<title>Language Test</title></head>
<body>
<h1>Test</h1>
<p>Hello. I'm part English <span lang="fr" xml:lang="fr">et
Fran&#231;ais</span>.</p>
</body></html>

[The following URIs are for reference only and represent "work in progress."]
[1] http://www.macvirus.com/
[2] http://purl.org/NET/ISO+IEC.15445/FinalCD.html
[3] http://purl.org/dc/about/element_set.htm
[4] http://www.w3.org/TR/NOTE-html-lan
[5] http://www.w3.org/TR/1999/WD-html-in-xml-19990224#guidelines

--
Susan Lesch <mailto:lesch@macvirus.com>
  Mac Virus <http://www.macvirus.com/>

Received on Tuesday, 2 March 1999 21:26:37 UTC