From bf110edfccddf0c22089df2861e0231bdb05c3a2 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Tue, 24 Jun 2008 17:06:46 +0000 Subject: [PATCH] xml:lang clarifications git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2009 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0030.xml | 5 ++++- xep-0115.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xep-0030.xml b/xep-0030.xml index 45d45160..b649f3c5 100644 --- a/xep-0030.xml +++ b/xep-0030.xml @@ -258,7 +258,10 @@ ]]> -

The target entity then MUST either return an IQ result, or return an error (see the Error Conditions section of this document). The result MUST contain a <query/> element qualified by the 'http://jabber.org/protocol/disco#info' namespace, which in turn contains one or more <identity/> elements and one or more <feature/> elements. (Note: Every entity MUST have at least one identity, and every entity MUST support at least the 'http://jabber.org/protocol/disco#info' feature; however, an entity is not required to return a result and MAY return an error, most likely &feature; or &unavailable;, although other error conditions may be appropriate.) Each <identity/> element MUST possess 'category' and 'type' attributes specifying the category and type for the entity, and MAY possess a 'name' attribute specifying a natural-language name for the entity. Each <feature/> element MUST possess a 'var' attribute whose value is a protocol namespace or other feature offered by the entity. Preferably, both the category/type values and the feature values will be registered in a public registry, as described in the XMPP Registrar Considerations section of this document.

+

The target entity then MUST either return an IQ result, or return an error (see the Error Conditions section of this document). The result MUST contain a <query/> element qualified by the 'http://jabber.org/protocol/disco#info' namespace, which in turn contains one or more <identity/> elements and one or more <feature/> elements. (Note: Every entity MUST have at least one identity, and every entity MUST support at least the 'http://jabber.org/protocol/disco#info' feature; however, an entity is not required to return a result and MAY return an error, most likely &feature; or &unavailable;, although other error conditions may be appropriate.)

+

Each <identity/> element MUST possess the 'category' and 'type' attributes specifying the category and type for the entity, and MAY possess a 'name' attribute specifying a natural-language name for the entity; the <identity/> element MAY also possess a standard 'xml:lang' attribute, which enables the entity to return localized results if desired (i.e., the <query/> element MAY include multiple <identity/> elements with the same category+type but with different 'xml:lang' values, however the <query/> element MUST NOT include multiple <identity/> elements with the same category+type+xml:lang but with different 'name' values).

+

Each <feature/> element MUST possess a 'var' attribute whose value is a protocol namespace or other feature offered by the entity.

+

Preferably, both the category/type values and the feature values will be registered in a public registry, as described in the XMPP Registrar Considerations section of this document.

Note: All sorting operations MUST be performed using "i;octet" collation as specified in Section 9.3 of &rfc4790;.

  1. Initialize an empty string S.
  2. -
  3. Sort the service discovery identities A registry of service discovery identities is located at &DISCOCATEGORIES;. by category and then by type and then by xml:lang (if it exists), formatted as CATEGORY '/' [TYPE] '/' [LANG] '/' [NAME]. Note that each slash is included even if the TYPE, LANG, or NAME is not included.
  4. +
  5. Sort the service discovery identities A registry of service discovery identities is located at &DISCOCATEGORIES;. by category and then by type and then by xml:lang (if it exists), formatted as CATEGORY '/' [TYPE] '/' [LANG] '/' [NAME]. The combination of category, type, and xml:lang forms a unique combination, so it is not necessary to also sort by name (the name merely provides some human-readable text associated with a category/type/lang). Note that each slash is included even if the TYPE, LANG, or NAME is not included.
  6. For each identity, append the 'category/type/lang/name' to S, followed by the '<' character.
  7. Sort the supported service discovery features. A registry of service discovery features is located at &DISCOFEATURES;.
  8. For each feature, append the feature to S, followed by the '<' character.