[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xml:lang attribute
On Thursday, August 7, 2003, at 03:40 PM, Arve Bersvendsen wrote:
Before someone suggests using "x-unknown" as an attribute for
undefined languages: That is overloading the meaning of xml:lang,
suggesting that we are using a private language, whose name is
"unknown". If the language is unknown, this should be addressed by
omitting the xml:lang attribute from that particular feed.
There is a set of cases where this will fail. Consider a group blog,
aggregating posts from a number of contributors. The feed for the blog
might have a xml:lang attribute of 'multiple', or 'en-us', or
'x-klingon'. But it may be that some of the entries in the feed come
from a source that provides no information about language.
Using your scheme, that entry would inherit the feed's language
attribute, which would be wrong. What if the feed is marked
'multiple'? That implies that the entry is multilingual, which is
wrong. The entry is of indeterminate language. There needs to be a
mechanism for explicitly stating "I do not know the language for this
element and its children".
Since xml:lang does not allow an 'unknown' attribute, what about
defining an 'atom:lang' attribute: xml:lang extended to allow 'unknown'
as a valid value.
If we then read the current informal specification [3], it says:
optional attributes of feed:
- xml:lang. SHOULD be included. MAY be overwritten on individual
entries, if the feed contains entries in more than one language.
Which is, IMHO, exactly as it should be. RFC 2119 [4] defines the use
of the word "SHOULD" as:
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.
If you forgive the cynicism, in my experience, the definition goes more
like this:
3. SHOULD Don't worry about implementing it.
...at least as far as language metadata is concerned.
-Maciej
---
Maciej Cegłowski (Mr.)
Lead Developer
Center for Educational Technology
Middlebury, VT 05753
mceglows@xxxxxxxxxxxxxx
(802) 443-5742