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

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

From: Cyril Concolato <cyril.concolato@enst.fr>
Date: Fri, 27 Nov 2009 11:29:08 +0100
Message-ID: <4B0FA9F4.9010508@enst.fr>
CC: public-webapps <public-webapps@w3.org>
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: ""

<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?

Cyril

-- 
Cyril Concolato
Maître de Conférences/Associate Professor
Groupe Mutimedia/Multimedia Group
Département Traitement du Signal et Images
/Dept. Signal and Image Processing
Ecole Nationale Supérieure des Télécommunications
46 rue Barrault
75 013 Paris, France
http://tsi.enst.fr/~concolat 
Received on Friday, 27 November 2009 10:29:31 GMT

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