Andreas Prilop wrote:
What was the reason to introduce a new attribute "xml:lang"
instead of "lang"? This bothers both authors and browsers
in different language versions: HTML 4, XHTML 1.0, XHTML 1.1.
HTML has only "lang"; XHTML 1.1 has only "xml:lang";
XHTML 1.0 has both!
For example, Mozilla 1.7 recognizes the lang attribute
http://www.unics.uni-hannover.de/nht...-attribute.htm
but it does not recognize the xml:lang attribute.
http://www.unics.uni-hannover.de/nht...ttribute.xhtml
What do we gain from "xml:lang"?
xml:lang is not a 'new' attribute. It's part of the XML1.0 specification
which predates XHTML. XHTML1.0 tries to be compatible with HTML4.01 and
supports the lang attributes and you should use both, if you want to be
compatiable with tag-soup parsers. But by being XML it also inherited
xml:lang. Using xml:lang has the advantage that this is (or could be)
recognized by any XML processing tool that needs this information (e.g.
spellcheckers) but does not have knowledge of the XHTML semantics (so it
does not understand 'lang').
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW:
http://pink.odahoda.de/