On 11/9/2011 3:35 PM, Peter Saint-Andre wrote:
On 11/9/11 4:32 PM, Mike Wacker wrote:
Since an item node for a disco#items query has a name attribute for a
natural-language name, does that mean that item nodes should also have a
corresponding xml:lang attribute?
For disco#info queries, the potential need for an xml:lang attribute is
called out in XEP-0030, section 3.1 [Basic Protocol for disco#info]
(although it's never reference in the schema). But there's no mention of
xml:lang at all in section 4.1 [Basic Protocol for disco#items].
However, it wouldn't be too hard to find a context where the results of
a disco#items query would be displayed to the user, which would seem to
suggest internationalization is necessary here.
XMPP is an XML technology, thus xml:lang is allowed on any element.
Naturally, we could add an example of that to XEP-0030.
Peter
4.4, Relationship Between an Entity and its Items, says that for one
possible relationship, "Upon querying an entity (JID1) for items, one
receives a list of items that cannot be addressed as JIDs; each
associated item has its own JID+node, where each JID equals JID1 and
each NodeID is unique."
But if we account for xml:lang, then we would potentially need multiple
items with the same NodeID but different languages, meaning NodeID will
not be unique if we want to localize the item. This is similar to
disco#info where (category, type, xml:lang) is the uniqueness key for an
identity.