No Description
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-0147.xml 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  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>XMPP URI Scheme Query Components</title>
  10. <abstract>This document defines a registry of query components to be used in the context of XMPP IRIs/URIs and also specifies an initial submission of values to that registry.</abstract>
  11. &LEGALNOTICE;
  12. <number>0147</number>
  13. <status>Active</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>RFC 5122</spec>
  20. <spec>XEP-0053</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>querytypes</shortname>
  25. <registry/>
  26. &stpeter;
  27. <revision>
  28. <version>1.2</version>
  29. <date>2006-09-13</date>
  30. <initials>psa</initials>
  31. <remark><p>Removed probe action.</p></remark>
  32. </revision>
  33. <revision>
  34. <version>1.1</version>
  35. <date>2006-06-19</date>
  36. <initials>psa</initials>
  37. <remark><p>Added actions for roster removal, presence unsubscription, and cancellation of registration; moved querytypes related to XMPP extensions from this document to the relevant XMPP Extension Protocol specifications.</p></remark>
  38. </revision>
  39. <revision>
  40. <version>1.0</version>
  41. <date>2006-03-23</date>
  42. <initials>psa</initials>
  43. <remark><p>Per a vote of the Jabber Council, advanced to Active.</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.7</version>
  47. <date>2006-03-16</date>
  48. <initials>psa</initials>
  49. <remark><p>Added actions for ad-hoc commands and vCard retrieval; clarified some explanatory text.</p></remark>
  50. </revision>
  51. <revision>
  52. <version>0.6</version>
  53. <date>2005-12-01</date>
  54. <initials>psa</initials>
  55. <remark><p>Updated to reflect draft-saintandre-xmpp-iri-03; modified file transfer query operations to handle both send and receive use cases.</p></remark>
  56. </revision>
  57. <revision>
  58. <version>0.5</version>
  59. <date>2005-09-05</date>
  60. <initials>psa</initials>
  61. <remark><p>Updated to reflect draft-saintandre-xmpp-iri-01; added file querytype for file transfer.</p></remark>
  62. </revision>
  63. <revision>
  64. <version>0.4</version>
  65. <date>2005-06-06</date>
  66. <initials>psa</initials>
  67. <remark><p>Updated to reflect draft-saintandre-xmpp-iri-00.</p></remark>
  68. </revision>
  69. <revision>
  70. <version>0.3</version>
  71. <date>2005-02-28</date>
  72. <initials>psa</initials>
  73. <remark><p>Updated to reflect draft-saintandre-xmpp-uri-08 and subsequent XMPP WG discussion; removed use cases for editing roster items, removing roster items, leaving chatrooms, unsubscribing, and unregistering (these make more sense from within a dedicated client); added use case for simultaneously joining a room and inviting other participants; further specified security considerations.</p></remark>
  74. </revision>
  75. <revision>
  76. <version>0.2</version>
  77. <date>2004-11-17</date>
  78. <initials>psa</initials>
  79. <remark><p>Updated to reflect draft-saintandre-xmpp-uri-07; specified Service Discovery usage.</p></remark>
  80. </revision>
  81. <revision>
  82. <version>0.1</version>
  83. <date>2004-11-12</date>
  84. <initials>psa</initials>
  85. <remark><p>Initial version.</p></remark>
  86. </revision>
  87. </header>
  88. <section1 topic='Introduction' anchor='intro'>
  89. <p>&rfc5122; defines a Uniform Resource Identifier (URI) scheme for use in forming URIs and Internationalized Resource Identifiers (IRIs) <note>On the difference between IRIs and URIs, see <cite>RFC 3987</cite>.</note> from the addresses of entities that can communicate using the Extensible Messaging and Presence Protocol (see &xmppcore;). Such identifiers enable identification of and interaction with XMPP entities by non-native applications such as databases and web browsers.</p>
  90. <p>However, <cite>RFC 5122</cite> intentionally leaves the potential values of the query component open-ended, does not provide a list of common "actions" for queries (e.g., send message or join chatroom), and does not specify recommended "key-value" pairs to be used in the context of such actions. Therefore, this document defines a registry of such actions and key-value pairs (to be maintained by the &REGISTRAR;) and specifies a set of initial values for that registry.</p>
  91. <p>This document is organized as follows:</p>
  92. <ul>
  93. <li>The registry is defined in the <link url='#registrar-querytype'>XMPP IRI/URI Querytype Registry</link> section.</li>
  94. <li>An initial set of actions and key-value pairs is described in the <link url='#actions'>Query Actions</link> section.</li>
  95. <li>A corresponding initial submission to the registry is specified in the <link url='#registrar-querytype-init'>Initial Registration</link> section.</li>
  96. <li>The process for submitting additional values to the registry is specified in the <link url='#registrar-querytype-process'>Registration Process</link> section.</li>
  97. </ul>
  98. <p>Note: The format of the XMPP URI scheme, including the format of the query component, is fully specified and formally defined in <cite>RFC 5122</cite>; this document does not modify the xmpp URI scheme in any way and assumes that the reader is familiar with all aspects of <cite>RFC 5122</cite>.</p>
  99. </section1>
  100. <section1 topic='Terminology' anchor='terms'>
  101. <p>This document inherits terminology from &rfc3986;, &rfc3987;, and <cite>RFC 5122</cite>.</p>
  102. </section1>
  103. <section1 topic='Query Actions' anchor='actions'>
  104. <p>The range of actions that might be triggered by interaction with an XMPP entity by means of an XMPP IRI/URI is potentially as wide as the range of extensions to XMPP. This document does not seek to exhaustively define all such potential actions. However, the following actions might be of general interest:</p>
  105. <ol>
  106. <li>Sending a message.</li>
  107. <li>Adding or removing a roster item.</li>
  108. <li>Subscribing to or unsubscribing from an entity's presence information.</li>
  109. <li>Determining &xep0030; information about an entity.</li>
  110. <li>Joining a groupchat room (see &xep0045;).</li>
  111. <li>Requesting initiation of &xep0050; associated with an entity.</li>
  112. <li>Retrieving the &xep0054; data associated with an entity.</li>
  113. <li>Subscribing to or unsubscribing from a &xep0060; node.</li>
  114. <li>Registering with another entity via &xep0077;.</li>
  115. <li>Initiating a file transfer with another entity (see &xep0096;).</li>
  116. </ol>
  117. <p>For each such action, the XMPP Registrar maintains a RECOMMENDED "querytype" (this can be thought of as an action name or "verb"; see <cite>RFC 5122</cite> for syntax and semantics) as well as an OPTIONAL list of keys to be used in key-value pairs if appropriate.</p>
  118. <p>The querytypes and key-value pairs related to <cite>RFC 3920</cite> and <cite>RFC 3921</cite> are defined herein; the querytypes and key-value pairs related to protocols defined in the XMPP Standards Foundation's XEP series are defined in the relevant XMPP Extension Protocol specifications.</p>
  119. <section2 topic='Message Action' anchor='actions-message'>
  120. <p>It may desirable for an XMPP IRI/URI to trigger a specialized interface for sending an XMPP message stanza. The RECOMMENDED querytype for this action is "message". If no key-value pair is provided, interacting with an XMPP IRI/URI that contains a querytype of "message" SHOULD trigger an interface that enables the user to input the text of an XMPP message and other relevant parameters (e.g., a message subject or &xep0071; markup).</p>
  121. <example caption='Basic Message Action'><![CDATA[
  122. xmpp:romeo@montague.net?message
  123. ]]></example>
  124. <p>A query component whose querytype is "message" MAY specify various key-value pairs. The following three keys are associated with the child elements of the &MESSAGE; stanza specified in the XML schema for the 'jabber:client' namespace as defined in &xmppim;:</p>
  125. <ol>
  126. <li>subject</li>
  127. <li>body</li>
  128. <li>thread</li>
  129. </ol>
  130. <p>In addition, the following three keys are associated with the attributes of the &MESSAGE; stanza specified in the XML schema for the 'jabber:client' namespace (the 'to' attribute is unnecessary, since it is provided by the XMPP address included in the IRI/URI):</p>
  131. <ol>
  132. <li>from</li>
  133. <li>id</li>
  134. <li>type</li>
  135. </ol>
  136. <p>Other keys MAY be registered with the XMPP Registrar but are not specified herein.</p>
  137. <example caption='Message Action with Keys: IRI/URI'><![CDATA[
  138. xmpp:romeo@montague.net?message;subject=Test%20Message;body=Here%27s%20a%20test%20message
  139. ]]></example>
  140. <example caption='Message Action with Keys: Resulting Stanza'><![CDATA[
  141. <message to='romeo@montague.net'>
  142. <subject>Test Message</subject>
  143. <body>Here&apos;s a test message.</body>
  144. </message>
  145. ]]></example>
  146. </section2>
  147. <section2 topic='Roster Management Actions' anchor='actions-roster'>
  148. <p>The 'jabber:iq:roster' namespace provides a mechanism for managing an XMPP roster (also called a "contact list"). This namespace is defined in <cite>RFC 3921</cite>. The following actions are defined.</p>
  149. <section3 topic='Add Roster Item' anchor='actions-roster-add'>
  150. <p>The registered querytype for adding items to the roster or editing items in the roster is "roster" (effectively there is no difference between adding and editing). An XMPP IRI/URI containing a "roster" querytype MAY also include at most one "name" key whose value maps to the 'name' attribute of the &lt;item/&gt; element within the 'jabber:iq:roster' namespace, and MAY contain one "group" key whose value maps to the character data of the &lt;group/&gt; child element of &lt;item/&gt;.</p>
  151. <example caption='Roster Action: IRI/URI'><![CDATA[
  152. xmpp:romeo@montague.net?roster
  153. ]]></example>
  154. <example caption='Roster Action: Resulting Stanza'><![CDATA[
  155. <iq type='set'>
  156. <query xmlns='jabber:iq:roster'>
  157. <item jid='romeo@montague.net'/>
  158. </query>
  159. </iq>
  160. ]]></example>
  161. <example caption='Roster Action With Name: IRI/URI'><![CDATA[
  162. xmpp:romeo@montague.net?roster;name=Romeo%20Montague
  163. ]]></example>
  164. <example caption='Roster Action With Name: Resulting Stanza'><![CDATA[
  165. <iq type='set'>
  166. <query xmlns='jabber:iq:roster'>
  167. <item jid='romeo@montague.net' name='Romeo Montague'/>
  168. </query>
  169. </iq>
  170. ]]></example>
  171. <example caption='Roster Action With Name and Group: IRI/URI'><![CDATA[
  172. xmpp:romeo@montague.net?roster;name=Romeo%20Montague;group=Friends
  173. ]]></example>
  174. <example caption='Roster Action With Name and Group: Resulting Stanza'><![CDATA[
  175. <iq type='set'>
  176. <query xmlns='jabber:iq:roster'>
  177. <item jid='romeo@montague.net' name='Romeo Montague'>
  178. <group>Friends</group>
  179. </item>
  180. </query>
  181. </iq>
  182. ]]></example>
  183. <p>Note: Methods (if any) for including more than one group are yet to be determined.</p>
  184. </section3>
  185. <section3 topic='Remove Roster Item' anchor='actions-roster-remove'>
  186. <p>The 'jabber:iq:roster' namespace includes a mechanism for removing an XMPP roster item. The registered querytype for removing an item from the roster is "remove".</p>
  187. <example caption='Roster Removal Action: IRI/URI'><![CDATA[
  188. xmpp:romeo@montague.net?remove
  189. ]]></example>
  190. <example caption='Roster Removal Action: Resulting Stanza'><![CDATA[
  191. <iq type='set'>
  192. <query xmlns='jabber:iq:roster'>
  193. <item jid='romeo@montague.net' subscription='remove'/>
  194. </query>
  195. </iq>
  196. ]]></example>
  197. </section3>
  198. </section2>
  199. <section2 topic='Subscription Management Actions' anchor='actions-sub'>
  200. <p>Closely coupled with roster management is presence subscription management. In XMPP, subscription management is handled via special values of the &PRESENCE; stanza, as described in <cite>RFC 3921</cite>. The following actions are defined</p>
  201. <section3 topic='Subscribe' anchor='actions-sub-subscribe'>
  202. <p>When an entity subscribes to another entity's presence by means of an XMPP IRI/URI, the invoked XMPP application SHOULD first send a roster add stanza as shown below (this is consistent with the recommendations in <cite>RFC 3921</cite>).</p>
  203. <example caption='Subscribe Action: IRI/URI'><![CDATA[
  204. xmpp:romeo@montague.net?subscribe
  205. ]]></example>
  206. <example caption='Subscribe Action: Resulting Stanzas'><![CDATA[
  207. <iq type='set'>
  208. <query xmlns='jabber:iq:roster'>
  209. <item jid='romeo@montague.net'/>
  210. </query>
  211. </iq>
  212. <presence to='romeo@montague.net' type='subscribe'/>
  213. ]]></example>
  214. </section3>
  215. <section3 topic='Unsubscribe' anchor='actions-sub-unsubscribe'>
  216. <p>XMPP includes a mechanism for unsubscribing from an entity. The registered querytype for doing so is "unsubscribe".</p>
  217. <example caption='Unsubscribe Action: IRI/URI'><![CDATA[
  218. xmpp:romeo@montague.net?unsubscribe
  219. ]]></example>
  220. <example caption='Unsubscribe Action: Resulting Stanza'><![CDATA[
  221. <presence to='romeo@montague.net' type='unsubscribe'/>
  222. ]]></example>
  223. </section3>
  224. </section2>
  225. </section1>
  226. <section1 topic='Internationalization Considerations' anchor='i18n'>
  227. <p>Internationalization considerations for XMPP IRIs/URIs are specified in <cite>RFC 5122</cite>; the reader is referred to that document for a complete discussion of the relevant issues.</p>
  228. <p>Localization of application-specific data presented to a human user (e.g., as encapsulated in key-value pairs) is the responsibility of the "using protocol".</p>
  229. </section1>
  230. <section1 topic='Security Considerations' anchor='security'>
  231. <p>Security considerations for XMPP IRIs/URIs are specified in <cite>RFC 5122</cite>.</p>
  232. <p>Completion of some of the actions defined herein will cause changes to an entity's account, subscriptions to information, registration with services, communication with other entities, completion of ad-hoc commands, and the like. Naturally, such changes, information, services, and communications are potentially undesirable (e.g., joining a chatroom whose discussion topic is not of interest to, or even patently offensive to, the joining user). The invoked application SHOULD appropriately warn a human user regarding the potential consequences of the action about to be completed.</p>
  233. </section1>
  234. <section1 topic='IANA Considerations' anchor='iana'>
  235. <p>This document requires no interaction with &IANA;. If in the future the IANA should wish to maintain a registry of XMPP URI/IRI query components, the XMPP Registrar will cooperate with efforts to migrate the registry from the XMPP Registrar to the IANA.</p>
  236. </section1>
  237. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  238. <section2 topic='XMPP IRI/URI Querytype Registry' anchor='registrar-querytype'>
  239. <p>The XMPP Registrar maintains a registry of querytype values (see &QUERYTYPES;).</p>
  240. <section3 topic='Registration Process' anchor='registrar-querytype-process'>
  241. &REGPROCESS;
  242. <code><![CDATA[
  243. <querytype>
  244. <name>the name of the querytype (e.g., "pubsub")</name>
  245. <proto>
  246. the namespace of associated protocol output
  247. (e.g., "http://jabber.org/protocol/pubsub")
  248. </proto>
  249. <desc>a natural-language description of the querytype</desc>
  250. <doc>the document in which the querytype is specified</doc>
  251. <keys>
  252. <key>
  253. <name>the name of the key (e.g., "action")</name>
  254. <desc>a natural-language description of the key</desc>
  255. <values>
  256. <value>
  257. <name>the name of a value (e.g., "subscribe")</name>
  258. <desc>a natural-language description of the value</desc>
  259. </value>
  260. </values>
  261. </key>
  262. </keys>
  263. </querytype>
  264. ]]></code>
  265. <p>Note: Within the &lt;querytype/&gt; element, the &lt;keys/&gt; child element is OPTIONAL; within any given &lt;key/&gt; element, the &lt;values/&gt; child element is also OPTIONAL.</p>
  266. <p>The registrant may register more than one querytype at a time, each contained in a separate &lt;querytype/&gt; element.</p>
  267. </section3>
  268. <section3 topic='Registration' anchor='registrar-querytype-reg'>
  269. <p>The following submission registers parameters related to the XMPP RFCs. For submissions related to XMPP extensions, refer to the relevant XMPP Extension Protocol specifications.</p>
  270. <code><![CDATA[
  271. <querytype>
  272. <name>message</name>
  273. <proto>jabber:client</proto>
  274. <desc>enables sending of an XMPP message stanza</desc>
  275. <doc>XEP-0147</doc>
  276. <keys>
  277. <key>
  278. <name>subject</name>
  279. <desc>a subject for the message per the "jabber:client" schema</desc>
  280. </key>
  281. <key>
  282. <name>body</name>
  283. <desc>a body for the message per the "jabber:client" schema</desc>
  284. </key>
  285. <key>
  286. <name>thread</name>
  287. <desc>a Thread ID for the message per the "jabber:client" schema</desc>
  288. </key>
  289. <key>
  290. <name>from</name>
  291. <desc>a from address for the message per the "jabber:client" schema</desc>
  292. </key>
  293. <key>
  294. <name>id</name>
  295. <desc>an ID for the message per the "jabber:client" schema</desc>
  296. </key>
  297. <key>
  298. <name>type</name>
  299. <desc>the message type per the "jabber:client" schema</desc>
  300. <values>
  301. <value>
  302. <name>chat</name>
  303. <desc>a message of type "chat"</desc>
  304. </value>
  305. <value>
  306. <name>groupchat</name>
  307. <desc>a message of type "groupchat"</desc>
  308. </value>
  309. <value>
  310. <name>headline</name>
  311. <desc>a message of type "headline"</desc>
  312. </value>
  313. <value>
  314. <name>normal</name>
  315. <desc>a message of type "normal"</desc>
  316. </value>
  317. </values>
  318. </key>
  319. </keys>
  320. </querytype>
  321. <querytype>
  322. <name>remove</name>
  323. <proto>jabber:iq:roster</proto>
  324. <desc>enables removing a roster item</desc>
  325. <doc>XEP-0147</doc>
  326. </querytype>
  327. <querytype>
  328. <name>roster</name>
  329. <proto>jabber:iq:roster</proto>
  330. <desc>enables adding or editing a roster item</desc>
  331. <doc>XEP-0147</doc>
  332. <keys>
  333. <key>
  334. <name>group</name>
  335. <desc>the user-assigned group for the roster item</desc>
  336. </key>
  337. <key>
  338. <name>name</name>
  339. <desc>the user-assigned name for the roster item</desc>
  340. </key>
  341. </keys>
  342. </querytype>
  343. <querytype>
  344. <name>subscribe</name>
  345. <proto>jabber:client</proto>
  346. <desc>enables sending a presence subscription request</desc>
  347. <doc>XEP-0147</doc>
  348. </querytype>
  349. <querytype>
  350. <name>unsubscribe</name>
  351. <proto>jabber:client</proto>
  352. <desc>enables unsubscribing from an entity's presence</desc>
  353. <doc>XEP-0147</doc>
  354. </querytype>
  355. ]]></code>
  356. </section3>
  357. </section2>
  358. </section1>
  359. </xep>