You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0120.xml 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Infobits</title>
  10. <abstract>NOTE: This proposal was retracted by the author on 2004-02-19.</abstract>
  11. <!--
  12. <abstract>A generic protocol for capturing granular information about users, servers, services, rooms, commands, nodes, files, and other phenomena on the Jabber network.</abstract>
  13. -->
  14. &LEGALNOTICE;
  15. <number>0120</number>
  16. <status>Retracted</status>
  17. <type>Standards Track</type>
  18. <sig>Standards</sig>
  19. <dependencies><spec>XMPP Core</spec></dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>infobits</shortname>
  23. &stpeter;
  24. &linuxwolf;
  25. <revision>
  26. <version>0.5</version>
  27. <date>2004-01-22</date>
  28. <initials>psa</initials>
  29. <remark>Clarified rationale for not using namespaces; added bundles; added dataype attribute for &lt;bit/&gt; elements; added Matt Miller as co-author.</remark>
  30. </revision>
  31. <revision>
  32. <version>0.4</version>
  33. <date>2003-12-14</date>
  34. <initials>psa</initials>
  35. <remark>Removed privacy list classes (which are to be defined in a separate proposal); added keynaming considerations; added more examples.</remark>
  36. </revision>
  37. <revision>
  38. <version>0.3</version>
  39. <date>2003-10-22</date>
  40. <initials>psa</initials>
  41. <remark>Major overhaul. Moved entity and relationship elements to XEP-0123, and focused this document only on the information format itself, which in all cases must be contained within another protocol.</remark>
  42. </revision>
  43. <revision>
  44. <version>0.2</version>
  45. <date>2003-09-28</date>
  46. <initials>psa</initials>
  47. <remark>Minor editorial revisions.</remark>
  48. </revision>
  49. <revision>
  50. <version>0.1</version>
  51. <date>2003-09-23</date>
  52. <initials>psa</initials>
  53. <remark>Initial version.</remark>
  54. </revision>
  55. </header>
  56. <section1 topic='Introduction'>
  57. <p>Many Jabber protocols need to define metadata about "things" on the Jabber network; such things are not limited to entities that are addressable as JIDs (e.g., users, servers, services, and chatrooms) nor even to things that are addressable as &xep0060; or &xep0030; nodes (e.g., &xep0050;), but may include anything that Jabber entities can communicate about, including files sent via Jabber file transfer protocols (e.g., &xep0066; and &xep0096;), information published via pubsub protocols (e.g., &xep0118;), and other Jabber phenomena. To date, Jabber protocols have used disparate, specialized formats for capturing such meta-information. This document provides a generic information format that can be included whenever a protocol needs to define metadata about something on the network.</p>
  58. </section1>
  59. <section1 topic='Background'>
  60. <p>The format defined herein uses a simple "key-value" structure. Although this may seem contrary to the XML basis of Jabber technologies, there are at least two good reasons for pursuing this approach:</p>
  61. <ol>
  62. <li><p>Using namespaced XML elements would force implementations to maintain a record of all namespaces and to differentiate those that define actionable protocols (e.g., 'http://jabber.org/protocol/si') from those that define informational metadata formats (e.g., 'http://purl.org/dc/elements/1.1'); the only way to do this would be to maintain an internal list of all possible namespaces that might be encountered by an application on the network.</p></li>
  63. <li><p>Not all metadata formats that the Jabber community may want to use exist in stable XML representations (e.g., this is true of the vCard format) or in representations for which namespaces exist. In addition, some metadata formats (e.g., &foaf;) exist only in &w3rdf;, whose syntax is represented in XML but whose semantics impose a more complex structure that requires a specialized (non-XML) parser. As long as a clear mapping can be defined between such metadata formats and Jabber infobits, consistent information representation and exchange can be preserved.</p></li>
  64. </ol>
  65. </section1>
  66. <section1 topic='Protocol'>
  67. <section2 topic='Protocol Basics'>
  68. <p>The "infobits" protocol defined herein provides a data format only. The container element is &lt;info/&gt;, which is qualified by the 'http://jabber.org/protocol/infobits' namespace. There is one allowable child of the &lt;info/&gt; element -- &lt;bundle/&gt; -- and one allowable child of the &lt;bundle/&gt; element -- &lt;bit/&gt;. In order to provide the relevant metadata, the &lt;info/&gt; element MAY contain an unbounded number of &lt;bundle/&gt; elements, each of which MAY contain an unbounded number of &lt;bit/&gt; elements.</p>
  69. <p>Each &lt;bundle/&gt; element MUST possess a 'type' attribute, whose value specifies the aspect of reality to which the enclosed bits apply (e.g., geographical location). A &lt;bundle/&gt; element MAY also possess a 'context' attribute, whose value provides further specifying information about the kind of entities described by this bundle (e.g., a home address as opposed to a work address).</p>
  70. <p>Each &lt;bit/&gt; element MUST possess a 'key' attribute, whose value specifies the name of the key (this MUST be an NMTOKEN as defined in &w3xml;). A &lt;bit/&gt; element MAY also possess a 'datatype' attribute, whose value specifies the datatype of the key (which SHOULD be a datatype specified in &w3xmlschema2; or in a registry of values maintained by the XMPP Registrar, such as those described in &xep0122;). The &lt;bit/&gt; element SHOULD contain XML character data that specifies the relevant value of the 'key'. A &lt;bundle/&gt; element MAY contain more than one &lt;bit/&gt; element with the same value for the 'key' attribute when necessary (e.g., two instances of 'weblog' if the person has multiple weblogs), but obviously SHOULD NOT do so if a collision would occur (e.g., two instances of 'lat' and 'lon' to define a geographical location).</p>
  71. <p><em><strong>Note well:</strong> no keys are defined in this document. All such keys MUST be defined in separate specifications. Keys and associated values shown in this document are provided for explanatory purposes only.</em></p>
  72. </section2>
  73. <section2 topic='Discovering Support'>
  74. <p>When an entity is queried via &xep0030; regarding the features it supports, it SHOULD include the 'http://jabber.org/protocol/infobits' namespace.</p>
  75. </section2>
  76. </section1>
  77. <section1 topic='Examples'>
  78. <section2 topic='Requesting Geographical Location Information From Another Entity'>
  79. <p>This set of examples is borrowed from &xep0080;.</p>
  80. <example caption='Requestor Requests Geolocation'><![CDATA[
  81. <iq type='get'
  82. from='linuxwolf@outer-planes.net/gabber2'
  83. to='stpeter@jabber.org'
  84. id='geoloc1'>
  85. <info xmlns='http://jabber.org/protocol/infobits'>
  86. <bundle type='http://jabber.org/protocol/infobits/bundles/geoloc'/>
  87. </info>
  88. </iq>
  89. ]]></example>
  90. <example caption='Entity Returns Geolocation Result'><![CDATA[
  91. <iq type='result'
  92. from='stpeter@jabber.org'
  93. to='linuxwolf@outer-planes.net/gabber2'
  94. id='geoloc1'>
  95. <info xmlns='http://jabber.org/protocol/infobits'>
  96. <bundle type='http://jabber.org/protocol/infobits/bundles/geoloc'>
  97. <bit key='geo.lat'>39.75477</bit>
  98. <bit key='geo.lon'>-104.99768</bit>
  99. <bit key='geo.alt'>1609</bit>
  100. <bit key='geo.gpserror'>10</bit>
  101. <bit key='DC.created'>20040116T17:15:25</bit>
  102. <bit key='DC.description'>Jabber, Inc.</bit>
  103. </bundle>
  104. </info>
  105. </iq>
  106. ]]></example>
  107. </section2>
  108. <section2 topic='Requesting All Infobits From Another Entity'>
  109. <example caption='Requestor Requests Information'><![CDATA[
  110. <iq type='get'
  111. from='linuxwolf@outer-planes.net/gabber2'
  112. to='stpeter@jabber.org'
  113. id='all1'>
  114. <info xmlns='http://jabber.org/protocol/infobits'/>
  115. </iq>
  116. ]]></example>
  117. <example caption='Entity Returns Information Result'><![CDATA[
  118. <iq type='result'
  119. from='stpeter@jabber.org'
  120. to='linuxwolf@outer-planes.net/gabber2'
  121. id='all1'>
  122. <info xmlns='http://jabber.org/protocol/infobits'>
  123. <bundle type='http://jabber.org/protocol/infobits/bundles/geoloc'>
  124. <bit key='geo.lat'>39.75477</bit>
  125. <bit key='geo.lon'>-104.99768</bit>
  126. <bit key='geo.alt'>1609</bit>
  127. <bit key='geo.gpserror'>10</bit>
  128. <bit key='DC.created'>20040116T17:15:25</bit>
  129. <bit key='DC.description'>Jabber, Inc.</bit>
  130. </bundle>
  131. <bundle type='http://jabber.org/protocol/infobits/bundles/name'>
  132. <bit key='vcard.prefix'>Mr.</bit>
  133. <bit key='vcard.givenname'>Peter</bit>
  134. <bit key='vcard.familyname'>Saint-Andre</bit>
  135. <bit key='vcard.nick'>stpeter</bit>
  136. </bundle>
  137. <bundle type='http://jabber.org/protocol/infobits/bundles/address'
  138. context='work'>
  139. <bit key='addr.floor'>6</bit>
  140. <bit key='vcard.street'>1899 Wynkoop Street</bit>
  141. <bit key='vcard.city'>Denver</bit>
  142. <bit key='vcard.region'>Colorado</bit>
  143. <bit key='vcard.country'>USA</bit>
  144. <bit key='vcard.pcode'>80202</bit>
  145. </bundle>
  146. <bundle type='http://jabber.org/protocol/infobits/bundles/address'
  147. context='home'>
  148. <bit key='vcard.city'>Denver</bit>
  149. <bit key='vcard.region'>Colorado</bit>
  150. <bit key='vcard.country'>USA</bit>
  151. <bit key='vcard.pcode'>80209</bit>
  152. </bundle>
  153. <bundle type='http://jabber.org/protocol/infobits/bundles/tel'
  154. context='work'>
  155. <bit key='vcard.phone'>+1 303-308-3282</bit>
  156. <bit key='vcard.fax'>+1 303-308-3215</bit>
  157. </bundle>
  158. <bundle type='http://jabber.org/protocol/infobits/bundles/tel'
  159. context='home'>
  160. <bit key='vcard.phone'>+1 303-555-1212</bit>
  161. </bundle>
  162. <bundle type='http://jabber.org/protocol/infobits/bundles/activity'>
  163. <bit key='rpid.activity'>busy</bit>
  164. <bit key='jsf.action'>writing</bit>
  165. <bit key='DC.created'>20040116T16:56:37</bit>
  166. </bundle>
  167. <bundle type='http://jabber.org/protocol/infobits/bundles/mood'>
  168. <bit key='jsf.mood'>grumpy</bit>
  169. <bit key='DC.created'>20040116T16:56:37</bit>
  170. </bundle>
  171. </info>
  172. </iq>
  173. ]]></example>
  174. </section2>
  175. <section2 topic='Publishing Tune Information'>
  176. <p>This set of examples is borrowed from &xep0118;.</p>
  177. <example caption='User Publishes Tune Information'><![CDATA[
  178. <iq type='set'
  179. from='stpeter@jabber.org/work'
  180. to='pubsub.jabber.org'
  181. id='tunes123'>
  182. <pubsub xmlns='http://jabber.org/protocol/pubsub'>
  183. <publish node='generic/tunes/stpeter@jabber.org'>
  184. <item id='current'>
  185. <info xmlns='http://jabber.org/protocol/infobits'>
  186. <bundle type='http://jabber.org/protocol/infobits/bundles/tunes'>
  187. <bit key='DC.creator'>Yes</bit>
  188. <bit key='DC.title'>Heart of the Sunrise</bit>
  189. <bit key='DC.source'>Yessongs</bit>
  190. <bit key='DC.identifier'>3</bit>
  191. <bit key='DC.extent'>P11M26S</bit>
  192. </bundle>
  193. </info>
  194. </item>
  195. </publish>
  196. </pubsub>
  197. </iq>
  198. ]]></example>
  199. <example caption='Tune Information is Delivered to All Subscribers'><![CDATA[
  200. <message
  201. from='pubsub.jabber.org'
  202. to='maineboy@jabber.org/laptop'>
  203. <x xmlns='http://jabber.org/protocol/pubsub#event'>
  204. <items node='generic/tunes/stpeter@jabber.org'>
  205. <item id='current'>
  206. <info xmlns='http://jabber.org/protocol/infobits'>
  207. <bundle type='http://jabber.org/protocol/infobits/bundles/tunes'>
  208. <bit key='DC.creator'>Yes</bit>
  209. <bit key='DC.title'>Heart of the Sunrise</bit>
  210. <bit key='DC.source'>Yessongs</bit>
  211. <bit key='DC.identifier'>3</bit>
  212. <bit key='DC.extent'>P11M26S</bit>
  213. </bundle>
  214. </info>
  215. </item>
  216. </items>
  217. </x>
  218. </message>
  219. ]]></example>
  220. </section2>
  221. </section1>
  222. <section1 topic='Security Considerations'>
  223. <p>Data provided via the infobits protocol MAY be world-readable. Access control considerations MUST be defined by any protocol that makes use of infobits.</p>
  224. </section1>
  225. <section1 topic='Internationalization Considerations'>
  226. <p>Info key names registered with the XMPP Registrar MUST be considered as identifiers, not English-language words. For purposes of internationalization, an identifier SHOULD be rendered as a word or phrase that is appropriate to the end user's preferred language.</p>
  227. </section1>
  228. <section1 topic='IANA Considerations'>
  229. <p>This document requires no interaction with &IANA;.</p>
  230. </section1>
  231. <section1 topic='XMPP Registrar Considerations'>
  232. <section2 topic='Namespaces'>
  233. <p>Upon advancement of this proposal to a status of Draft, the &REGISTRAR; shall add the 'http://jabber.org/protocol/infobits' namespace to its registry of official namespaces.</p>
  234. </section2>
  235. <section2 topic='Registries'>
  236. <p>The XMPP Registrar shall maintain a registry of infobit keynames and associated information.</p>
  237. <p>All keynames MUST begin with a short prefix string (letters and numbers only), followed by the '.' character used as a separator, followed by the name of the key as determined by the particular specification or organization that is identified with the prefix. Arbitrary keynames SHOULD begin with a prefix consisting of the capital 'X' character.</p>
  238. <p>The XMPP Registrar shall at its discretion reserve certain keyname prefixes for use in specifying particular classes of information. One example is the prefix 'DC', which is reserved for use by infobits specified by the &DUBLINCORE; (for details, see &xep0121;). Furthermore, the XMPP Registrar shall reserve the "XMPP" prefix for infobits related to documents created by the &XMPPWG; or its successors, and shall reserve the upper-case versions of all protocol "shortnames" specified in XMPP Extension Protocol specifications (e.g., a prefix of "MUC" for infobits related to &xep0045;).</p>
  239. <p>In order to prevent naming collisions, infobits that will be used in public protocols that may interoperate with other protocols on the network SHOULD be registered with the XMPP Registrar, and MUST be so registered if they are defined in XMPP Extension Protocol specifications (however, registration of private keys is NOT REQUIRED). Registration with the XMPP Registrar shall be considered to entail reservation of that infobit on the network, and a registered bit MUST NOT be re-used by other protocols and applications for purposes other than those implied by the registry entry.</p>
  240. <p>In addition to the key name, the following data may be provided (but is not required) for each bit:</p>
  241. <ol>
  242. <li>datatype -- provide only if well-defined; otherwise assume string</li>
  243. <li>doc -- the public identifier (e.g., XEP number or RFC number) of the document in which the info name is defined</li>
  244. <li>valid values -- a series of &lt;value/&gt; elements, encapsulated within a &lt;values/&gt; parent whose 'type' attribute is set to "exhaustive" (these are the only valid values) or "nonexhaustive" (these are some of the valid values, but this list is not exhaustive and other values may be provided)</li>
  245. </ol>
  246. <p>The registry format is as follows:</p>
  247. <code><![CDATA[
  248. <bit key='thename'>
  249. <datatype>some datatype</datatype>
  250. <doc>some document identifier</doc>
  251. <values type='[exhaustive|nonexhaustive]'>
  252. <value>first value</value>
  253. <value>second value</value>
  254. </values>
  255. </bit>
  256. ]]></code>
  257. </section2>
  258. </section1>
  259. <section1 topic='XML Schema'>
  260. <code><![CDATA[
  261. <?xml version='1.0' encoding='UTF-8'?>
  262. <xs:schema
  263. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  264. targetNamespace='http://jabber.org/protocol/infobits'
  265. xmlns='http://jabber.org/protocol/infobits'
  266. elementFormDefault='qualified'>
  267. <xs:element name='info'>
  268. <xs:complexType>
  269. <xs:sequence>
  270. <xs:element ref='bundle' minOccurs='1' maxOccurs='unbounded'/>
  271. </xs:sequence>
  272. </xs:complexType>
  273. </xs:element>
  274. <xs:element name='bundle'>
  275. <xs:complexType>
  276. <xs:sequence>
  277. <xs:element ref='bit' minOccurs='1' maxOccurs='unbounded'/>
  278. </xs:sequence>
  279. <xs:attribute name='type' type='xs:string' use='required'/>
  280. <xs:attribute name='context' type='xs:string' use='required'/>
  281. </xs:complexType>
  282. </xs:element>
  283. <xs:element name='bit'>
  284. <xs:complexType>
  285. <xs:simpleContent>
  286. <xs:extension base='xs:string'>
  287. <xs:attribute name='key' type='xs:NMTOKEN' use='required'/>
  288. <xs:attribute name='datatype' type='xs:NMTOKEN' use='optional'/>
  289. </xs:extension>
  290. </xs:simpleContent>
  291. </xs:complexType>
  292. </xs:element>
  293. </xs:schema>
  294. ]]></code>
  295. </section1>
  296. <section1 topic='Historical Note'>
  297. <p>Before defining a new protocol for metadata, the primary author of this proposal investigated several promising technologies that could be used to meet the above requirements -- in particular, the Friend of a Friend (FOAF) vocabulary, which is a subset of the Resource Description Framework (RDF). Ultimately, the primary author concluded that, while FOAF and RDF have many merits, they are not ideal for use on the Jabber network. In particular:</p>
  298. <ol>
  299. <li>Although RDF uses XML syntax, processing of RDF requires an RDF parser, not an XML parser. The benefits of using RDF were outweighed by the costs of requiring an RDF parser in every application that would use the metadata format.</li>
  300. <li>By design, FOAF and RDF allow an entity to define information about any other entity; this gives rise to significant concerns about data integrity, which have not been solved (and perhaps even cannot be solved) within the context of an RDF application.</li>
  301. <li>The processes for proposing, changing, and approving RDF-related namespaces are not well defined and are outside the control or influence of the Jabber community.</li>
  302. </ol>
  303. <p>Given these and other concerns, the primary author concluded that the best course would be to define an extensible XML protocol that can be processed using tools that are standard within existing Jabber/XMPP implementations, that allows only the entity itself to define metadata about itself, and that is under the control of the Jabber/XMPP community.</p>
  304. </section1>
  305. </xep>