[standards-jig] Service discovery and localization

Matthew A. Miller linuxwolf at outer-planes.net
Mon Dec 8 18:56:26 UTC 2003

So far, we've explicitly said that <item/> elements are unique by "jid" 
and "node", and that more than one "jid" + "node" SHOULD NOT (IIRC) 
occur in the same result.  This would change that, and could break 
existing software, for what appreciable benefit?  I don't think this is 
a good solution for <iq/>-based usage in general, and disco in 

In reality, it is very, very rare that a requester would need multiple 
locales with a single retrieval.  It is much more common that the 
requester would know it's own locale, and would (*should*) inform the 
responder it wants results in that locale.

I believe it has been implied in the past that the "xml:lang" of the 
outlying <iq/> determines what localization the results should be 
returned as (with a missing "xml:lang" meaning the results are in the 
responder's default locale).  How about simply explicitly relying on 
this behavior?  Additionally, as a more complete compromise, use the 
"xml:lang" on each <item/> that is *not* in the returned locale (since, 
in the Real World, not every string is necessarily translated).  I don't 
expect every implementation to know what locale a string was localized 
as, so implementations shouldn't depend on this.

Personally, I'd rather we stuck to a single locale (as much as possible) 
in the results of such things.  It makes all our software simpler 
(requester- and responder-side).

Just my 0.02 USD...

-  LW

[1]  In the case of <message/> and <presence/>, where the recipient 
really can be more than one entity (each in their own locale), it makes 
sense for <body/>, <status/>, <subject/>, et al to have locale-dependent 
versions.  However, in the case of <iq/>-based protocols (where the 
recipient is truly intended to be a single entity), this would be 

Peter Saint-Andre wrote:

>On Mon, Dec 08, 2003 at 12:49:20AM +0100, Matthias Wimmer wrote:
>>How should service discovery results be localized? Is the usage
>>of xml:lang-attributes allowed for service discovery?
>Hallo Matthias,
>What kind of results? Are you thinking about something like this?
>    <item jid='words.shakespeare.lit' 
>          xml:lang='en'
>          name='Shakespearean Dictionary'/>
>    <item jid='words.shakespeare.lit' 
>          xml:lang='de'
>          name='Shakespearische Woerterbuch'/>
>Obviously this is not specified in the JEP right now, but IMHO it is a
>straightforward extension of the usage defined in the XMPP I-Ds.

More information about the Standards mailing list