W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

Re: [widgets] test-suite, default xml:lang

From: Marcos Caceres <marcosc@opera.com>
Date: Fri, 27 Nov 2009 19:39:00 +0100
Message-ID: <b21a10670911271039p5efa3958q77fcedbaeb648712@mail.gmail.com>
To: "cyril.concolato" <cyril.concolato@telecom-paristech.fr>
Cc: public-webapps <public-webapps@w3.org>
On Fri, Nov 27, 2009 at 11:29 AM, Cyril Concolato
<cyril.concolato@enst.fr> wrote:
> Cyril Concolato a écrit :
>> Hi all,
>> I'm trying to understand the difference between two tests:
>> [1]
>> http://dev.w3.org/2006/waf/widgets/test-suite/test-cases/ta-UEMbyHERkI/000/config.xml
>> [2]
>> http://dev.w3.org/2006/waf/widgets/test-suite/test-cases/ta-UEMbyHERkI/003/config.xml
>> In [1], the first <description> element is supposed to be the valid one
>> (it does not have an xml:lang attribute).
>> In [2], the first <description> element as a dummy xml:lang that's not
>> supposed to match anything. The second <description> element does not have
>> the xml:lang attribute, but according to the expected result, it should not
>> be the selected one. I don't understand why? Can you explain what the user
>> locale should be in both cases?
>> The test suite document indicates that it should be "en". If this is the
>> case, in [1] no description element shall match. Otherwise you probably want
>> to indicate that some tests assumes "*" like [1] and others "en" like [2].
>> Am I wrong?
> Actually, I found a sentence that I missed in previous readings, which
> explains the difference between [1] and [2]:
> "In the case whereby the author does not use an xml:lang attribute, and no
> element of a particular type with xml:lang matches the user agent locales,
> the user agent will use the first element that is unlocalized content, in
> document order, that matches the element type being sought."
> As a clarification can you tell me what would be the name value for the
> following config documents assuming the user locale is "en" only (no "*")
> <widget xmlns="http://www.w3.org/ns/widgets">
> <name xml:lang="fr">A</name>
> <name xml:lang="kr">B</name>
> <name xml:lang="it">C</name>
> </widget>
> My guess would be: ""

Your guess would be correct. If no match is made and there is no
localized content, then there is no match.

> <widget xmlns="http://www.w3.org/ns/widgets">
> <name xml:lang="fr">A</name>
> <name xml:lang="kr">B</name>
> <name>D</name>
> <name xml:lang="it">C</name>
> </widget>
> My guess would be: "D"
> Am I correct?

Again, you are correct. I believe we have a test for that:


I guess it would be of value to add  another example or two in the
spec. I will do that when we go to PR.

Thanks again for the feedback and for helping us improve both the spec
and the test suite! Sorry there are bits that are a bit ambiguous -
keep the feedback coming so we can fix that!:)

Marcos Caceres
Received on Friday, 27 November 2009 18:39:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:35 GMT