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

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 UTC