W3C home > Mailing lists > Public > www-international@w3.org > April to June 2001

Re: xml:lang - Languagetypes available as modular xsd-file?

From: John Cowan <jcowan@reutershealth.com>
Date: Thu, 05 Apr 2001 17:15:44 -0400
Message-ID: <3ACCE080.4030207@reutershealth.com>
To: "I.Eck" <post@inga-eckermann.de>, www-international <www-international@w3.org>
I.Eck wrote:


> I would still like to know
> whether there is a tagged form of the standard codes, so that
> I can import them directly in XML.

I can't speak to currency codes, but trying to specify xml:lang values
by enumeration is hopeless.  Now that XML 1.0 2nd ed. is referencing
RFC 3066, there are more than 400 different *simple* language codes,
without even considering national and regional varieties, many of
which are extremely important (for example, de-DE versus de-CH).

It is bad practice to try to validate anything about language tags
at the XML level.  Although XML 1.0 1st ed. provided productions that
supposedly gave the syntax, these productions were not normative
for anything (neither well-formedness nor validity), and have been
removed from the 2nd ed.

Instead, just carry the language tag as CDATA until you get to some
component which actually needs to interpret it, such as text-to-speech,
spelling check, or whatever.  That component will necessarily handle
only a few of the thousands of possibilities.  It will simply have to
cope with the fact that it may receive language tags it cannot recognize,
and must fall back, or give up, or both.

-- 
There is / one art             || John Cowan <jcowan@reutershealth.com>
no more / no less              || http://www.reutershealth.com
to do / all things             || http://www.ccil.org/~cowan
with art- / lessness           \\ -- Piet Hein
Received on Thursday, 5 April 2001 17:14:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:16:56 GMT