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-0050.xml 50KB

  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>Ad-Hoc Commands</title>
  10. <abstract>This document defines an XMPP protocol extension for advertising and executing application-specific commands, such as those related to a configuration workflow. Typically the commands contain data forms (XEP-0004) in order to structure the information exchange.</abstract>
  12. <number>0050</number>
  13. <status>Draft</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <dependencies>
  17. <spec>XMPP Core</spec>
  18. <spec>XEP-0004</spec>
  19. <spec>XEP-0030</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>commands</shortname>
  24. <schemaloc>
  25. <url></url>
  26. </schemaloc>
  27. &linuxwolf;
  28. <revision>
  29. <version>1.2.2</version>
  30. <date>2016-12-03</date>
  31. <initials>XEP Editor (ssw, fs)</initials>
  32. <remark>Mark 'note' element's 'type' attribute as optional in the schema. Introduce 'Acknowledgements' section.</remark>
  33. </revision>
  34. <revision>
  35. <version>1.2.1</version>
  36. <date>2015-10-15</date>
  37. <initials>XEP Editor (mam)</initials>
  38. <remark>Corrected text regarding "xml:lang" is an attribute not an element (Christian Schudt).</remark>
  39. </revision>
  40. <revision>
  41. <version>1.2</version>
  42. <date>2005-06-30</date>
  43. <initials>psa</initials>
  44. <remark>Corrected typos and other small errors.</remark>
  45. </revision>
  46. <revision>
  47. <version>1.1.1</version>
  48. <date>2004-01-02</date>
  49. <initials>lw</initials>
  50. <remark>Cleaned up errors in schema; added more clarifications about actions</remark>
  51. </revision>
  52. <revision>
  53. <version>1.1</version>
  54. <date>2003-12-30</date>
  55. <initials>lw</initials>
  56. <remark>More strict usage of the terms "requester" and "responder"; added explicit flow-control information; cleaned up i18n and l10n based on IETF efforts</remark>
  57. </revision>
  58. <revision>
  59. <version>1.0</version>
  60. <date>2003-05-19</date>
  61. <initials>psa</initials>
  62. <remark>Per a vote of the Jabber Council, advanced status to Draft.</remark>
  63. </revision>
  64. <revision>
  65. <version>0.13</version>
  66. <date>2003-04-28</date>
  67. <initials>lw</initials>
  68. <remark>More clarity on security; added notes about i18n and l10n; included xml:lang in XML-Schema.</remark>
  69. </revision>
  70. <revision>
  71. <version>0.12</version>
  72. <date>2003-04-22</date>
  73. <initials>lw</initials>
  74. <remark>Fixed typos; removed references to &PRESENCE;; added more security condiderations; added notes about &lt;command/&gt; child precedence.</remark>
  75. </revision>
  76. <revision>
  77. <version>0.11</version>
  78. <date>2003-02-20</date>
  79. <initials>lw</initials>
  80. <remark>Created XML Schema.</remark>
  81. </revision>
  82. <revision>
  83. <version>0.10</version>
  84. <date>2003-02-20</date>
  85. <initials>lw</initials>
  86. <remark>Relaxed and clarified &lt;command/&gt; payload requirements; Fixed minor errors in examples.</remark>
  87. </revision>
  88. <revision>
  89. <version>0.9.1</version>
  90. <date>2003-02-12</date>
  91. <initials>lw</initials>
  92. <remark>Fixed disco examples to reflect specification text.</remark>
  93. </revision>
  94. <revision>
  95. <version>0.9</version>
  96. <date>2003-02-09</date>
  97. <initials>lw</initials>
  98. <remark>Added "Implementation Notes" section; Removed syntax requirements for disco &lt;item/&gt; "node" attributes; Added "disclaimer" with regards to "node" values; Added clarifications regarding predefined/required commands; Added clarifications for command payloads; Added clarifications for command success versus failure; Added clarifications on "sessionid"; Fixed "x:data" errors.</remark>
  99. </revision>
  100. <revision>
  101. <version>0.8</version>
  102. <date>2003-01-26</date>
  103. <initials>lw</initials>
  104. <remark>Fixed minor grammatical errors; Changed some MUSTs to SHOULDs.</remark>
  105. </revision>
  106. <revision>
  107. <version>0.7</version>
  108. <date>2003-01-22</date>
  109. <initials>lw</initials>
  110. <remark>Added disco node syntax for commands; Expanded "XMPP Registrar" section.</remark>
  111. </revision>
  112. <revision>
  113. <version>0.6</version>
  114. <date>2003-01-21</date>
  115. <initials>lw</initials>
  116. <remark>Consistency in the usage of the "x-commands" short name; Added "Discovering Support" usecase; made other disco usage more "disco-like".</remark>
  117. </revision>
  118. <revision>
  119. <version>0.5</version>
  120. <date>2003-01-18</date>
  121. <initials>lw</initials>
  122. <remark>Fixed minor errors; Removed "complete" action value from &lt;command/&gt;; Removed &lt;list/&gt; in favor of disco.</remark>
  123. </revision>
  124. <revision>
  125. <version>0.4</version>
  126. <date>2002-11-05</date>
  127. <initials>lw</initials>
  128. <remark>Fixed minor errors with examples; Changed position of DTD to be more consistent with other XEPs by this author; Added details for "disco" support; Added section on "Security Considerations", "IANA Considerations", and "JANA Considerations".</remark>
  129. </revision>
  130. <revision>
  131. <version>0.3</version>
  132. <date>2002-10-11</date>
  133. <initials>lw</initials>
  134. <remark>Fixed minor errors with examples; Changed from using &lt;query/&gt; and &lt;x/&gt; to &lt;list/&gt; for command lists; Made the "cancel" use-case more explicit.</remark>
  135. </revision>
  136. <revision>
  137. <version>0.2</version>
  138. <date>2002-10-10</date>
  139. <initials>lw</initials>
  140. <remark>Changed namespace from "jabber:x:commands" to ""; Changed execution to use &lt;iq/&gt; instead of any packet element; Changed execution to contain extensions; Reorganized for better clarity; Corrected spelling and grammar errors.</remark>
  141. </revision>
  142. <revision>
  143. <version>0.1</version>
  144. <date>2002-10-08</date>
  145. <initials>lw</initials>
  146. <remark>Initial release.</remark>
  147. </revision>
  148. </header>
  149. <section1 topic='Introduction' anchor='intro'>
  150. <p>This document specifies an XMPP protocol extension that enables an entity to initiate a command session where there is no preferred namespace. It also specifies a protocol extension for describing the types of ad hoc sessions, similar in concept to a menu.</p>
  151. <section2 topic='Motivation' anchor='motivation'>
  152. <p>The motivation for such a protocol comes from the desire to expand Jabber technologies outside the domain of instant messaging. Similar to web applications, these "Jabber applications" are systems in which, via a compliant Jabber client, a user (or automated process) can interact with the application. The client need not be specially-written in order to take advantage of this Jabber application.</p>
  153. <p>This mechanism allows for a larger base of Jabber entities to participate as part of larger application architectures. Although specialized clients would be preferred in many environments, this protocol allows for applications to have a wider audience (i.e., any compliant Jabber client).</p>
  154. </section2>
  155. <section2 topic='Concepts' anchor='concepts'>
  156. <p>The namespace governing this protocol is "" (hereafter referred to as x-commands). This namespace relies on the &IQ; element for execution, and can use the &MESSAGE; element for announcing command lists. This protocol depends on &xep0030; for reporting and announcing command lists. This namespace is intended to complement &xep0004; (jabber:x:data), but is not necessarily dependent upon it.</p>
  157. </section2>
  158. <section2 topic='Prerequisites' anchor='prerequisites'>
  159. <p>Support of x-commands implies support for "jabber:x:data" (although this requirement may be replaced and/or amended with a requirement to support &xep0020; by performing the appropriate negotations before executing commands). x-commands provides a bootstrap for performing ad-hoc "jabber:x:data" processes, while the data itself is conveyed using "jabber:x:data".</p>
  160. <p>The x-commands namespace is not designed to replace machine-to-machine oriented RPC systems such as &xep0009;, where the two entities fully understand the command's purpose and behavior prior to execution. x-commands is oriented more for human interaction, where the user agent (such as a compliant Jabber client) most likely has no prior knowledge of the command's purpose and behavior.</p>
  161. </section2>
  162. </section1>
  163. <section1 topic='Use Cases' anchor='usecases'>
  164. <section2 topic='Discovering Support' anchor='discover'>
  165. <p>To determine if an entity supports x-commands, the requester uses Service Discovery. The requester makes an "#info" query to the responder. If supported, the responder includes a &lt;feature/&gt; with the "var" of "".</p>
  166. <example caption='Disco request for information'><![CDATA[
  167. <iq type='get'
  168. to='responder@domain'
  169. from='requester@domain'>
  170. <query xmlns=''/>
  171. </iq>
  172. ]]></example>
  173. <example caption='Disco result for information'><![CDATA[
  174. <iq type='result'
  175. from='responder@domain'
  176. to='requester@domain'>
  177. <query xmlns=''>
  178. ...
  179. <feature var=''/>
  180. ...
  181. </query>
  182. </iq>
  183. ]]></example>
  184. </section2>
  185. <section2 topic='Retrieving the Command List' anchor='retrieve'>
  186. <p>To find what commands an entity provides, the requester uses Service Discovery. Each command is a node of the responder, under the fixed node "" (for which the service discovery identity category is "automation" and type is "command-list"). Use of a fixed node for all commands of an entity allows for immediate retrieval of commands.</p>
  187. <p>Each command is a disco item. The node attribute of &lt;item/&gt; identifies the command, and the name attribute is the label for the command.</p>
  188. <p>The requester retrieves the list of commands by querying for the responder's items for the node "":</p>
  189. <example caption='Disco request for items'><![CDATA[
  190. <iq type='get'
  191. from='requester@domain'
  192. to='responder@domain'>
  193. <query xmlns=''
  194. node=''/>
  195. </iq>
  196. ]]></example>
  197. <example caption='Disco result for items'><![CDATA[
  198. <iq type='result'
  199. to='requester@domain'
  200. from='responder@domain'>
  201. <query xmlns=''
  202. node=''>
  203. <item jid='responder@domain'
  204. node='list'
  205. name='List Service Configurations'/>
  206. <item jid='responder@domain'
  207. node='config'
  208. name='Configure Service'/>
  209. <item jid='responder@domain'
  210. node='reset'
  211. name='Reset Service Configuration'/>
  212. <item jid='responder@domain'
  213. node='start'
  214. name='Start Service'/>
  215. <item jid='responder@domain'
  216. node='stop'
  217. name='Stop Service'/>
  218. <item jid='responder@domain'
  219. node='restart'
  220. name='Restart Service'/>
  221. </query>
  222. </iq>
  223. ]]></example>
  224. <p>The result can then be used by the client to populate a menu, a dialog of buttons, or whatever is appropriate to the current user interface. The responder is not required to send the same list of commands to all requesters.</p>
  225. <p>If additional information about a command is desired, the requester queries for disco information on the command node:</p>
  226. <example caption='Disco request for command information'><![CDATA[
  227. <iq type='get'
  228. from='requester@domain'
  229. to='responder@domain'>
  230. <query xmlns=''
  231. node='config'/>
  232. </iq>
  233. ]]></example>
  234. <example caption='Disco result for command information'><![CDATA[
  235. <iq type='result'
  236. to='requester@domain'
  237. from='responder@domain'>
  238. <query xmlns=''
  239. node='config'>
  240. <identity name='Configure Service'
  241. category='automation'
  242. type='command-node'/>
  243. <feature var=''/>
  244. <feature var='jabber:x:data'/>
  245. </query>
  246. </iq>
  247. ]]></example>
  248. <p>A responder MUST at least provide &lt;identity category='automation' type='command-node'/&gt; and &lt;feature var=''/&gt;, and SHOULD include &lt;feature var='jabber:x:data'/&gt;. It is not required to support additional information about a command. If the command is not available to the requester, the responder SHOULD respond with a 403 "Forbidden" error.</p>
  249. </section2>
  250. <section2 topic='Announcing the Command List' anchor='announce'>
  251. <p>In some cases, a responder entity may find it appropriate to automatically push this information (e.g. a subscribed entity becomes available). In this case, the entity sends a &MESSAGE; containing the proper disco#items &QUERY;:</p>
  252. <example caption='Announcing commands (via &lt;message/&gt;)'><![CDATA[
  253. <message from='responder@domain' to='requester@domain'>
  254. <subject>Service Controls</subject>
  255. <query xmlns=''
  256. node=''>
  257. <item jid='responder@domain'
  258. node='list'
  259. name='List Service Configurations'/>
  260. <item jid='responder@domain'
  261. node='config'
  262. name='Configure Service'/>
  263. <item jid='responder@domain'
  264. node='reset'
  265. name='Reset Service Configuration'/>
  266. <item jid='responder@domain'
  267. node='start'
  268. name='Start Service'/>
  269. <item jid='responder@domain'
  270. node='stop'
  271. name='Stop Service'/>
  272. <item jid='responder@domain'
  273. node='restart'
  274. name='Restart Service'/>
  275. </query>
  276. </message>
  277. ]]></example>
  278. <p>The only portion required is &lt;query xmlns=''/&gt;. Any other information (such as the &lt;subject/&gt; in the foregoing example) is OPTIONAL.</p>
  279. </section2>
  280. <section2 topic='Executing Commands' anchor='execute'>
  281. <section3 topic='Simple Execution' anchor='execute-simple'>
  282. <p>To execute a command, the requester sends an &IQ; containing the command to execute:</p>
  283. <example caption="Execute command request"><![CDATA[
  284. <iq type='set' to='responder@domain' id='exec1'>
  285. <command xmlns=''
  286. node='list'
  287. action='execute'/>
  288. </iq>
  289. ]]></example>
  290. <p>The requester MAY include the "action='execute'", although this is implied.</p>
  291. <p>If the command does not require any user interaction (returns results only), the responder sends a packet similar to the following:</p>
  292. <example caption="Execute command result"><![CDATA[
  293. <iq type='result' from='responder@domain' to='requester@domain' id='exec1'>
  294. <command xmlns=''
  295. sessionid='list:20020923T213616Z-700'
  296. node='list'
  297. status='completed'>
  298. <x xmlns='jabber:x:data' type='result'>
  299. <title>Available Services</title>
  300. <reported>
  301. <field var='service' label='Service'/>
  302. <field var='runlevel-1' label='Single-User mode'/>
  303. <field var='runlevel-2' label='Non-Networked Multi-User mode'/>
  304. <field var='runlevel-3' label='Full Multi-User mode'/>
  305. <field var='runlevel-5' label='X-Window mode'/>
  306. </reported>
  307. <item>
  308. <field var='service'><value>httpd</value></field>
  309. <field var='runlevel-1'><value>off</value></field>
  310. <field var='runlevel-2'><value>off</value></field>
  311. <field var='runlevel-3'><value>on</value></field>
  312. <field var='runlevel-5'><value>on</value></field>
  313. </item>
  314. <item>
  315. <field var='service'><value>postgresql</value></field>
  316. <field var='runlevel-1'><value>off</value></field>
  317. <field var='runlevel-2'><value>off</value></field>
  318. <field var='runlevel-3'><value>on</value></field>
  319. <field var='runlevel-5'><value>on</value></field>
  320. </item>
  321. <item>
  322. <field var='service'><value>jabberd</value></field>
  323. <field var='runlevel-1'><value>off</value></field>
  324. <field var='runlevel-2'><value>off</value></field>
  325. <field var='runlevel-3'><value>on</value></field>
  326. <field var='runlevel-5'><value>on</value></field>
  327. </item>
  328. </x>
  329. </command>
  330. </iq>
  331. ]]></example>
  332. </section3>
  333. <p>The above example shows the command execution resulting in a "jabber:x:data" form. It is also possible that one or more URLs (specified via &xep0066;) could be returned.</p>
  334. <section3 topic='Multiple Stages' anchor='execute-multiple'>
  335. <p>If the command requires more interaction, the responder sends a result &IQ; that contains the command information and the form to be filled out:</p>
  336. <example caption='Execute command request (stage 1)'><![CDATA[
  337. <iq type='set' to='responder@domain' id='exec1'>
  338. <command xmlns=''
  339. node='config'
  340. action='execute'/>
  341. </iq>
  342. ]]></example>
  343. <example caption='Execute command result (stage 1)'><![CDATA[
  344. <iq type='result' from='responder@domain' to='requester@domain' id='exec1'>
  345. <command xmlns=''
  346. sessionid='config:20020923T213616Z-700'
  347. node='config'
  348. status='executing'>
  349. <actions execute='next'>
  350. <next/>
  351. </actions>
  352. <x xmlns='jabber:x:data' type='form'>
  353. <title>Configure Service</title>
  354. <instructions>
  355. Please select the service to configure.
  356. </instructions>
  357. <field var='service' label='Service' type='list-single'>
  358. <option><value>httpd</value></option>
  359. <option><value>jabberd</value></option>
  360. <option><value>postgresql</value></option>
  361. </field>
  362. </x>
  363. </command>
  364. </iq>
  365. ]]></example>
  366. <p>The &lt;command/&gt; SHOULD include an &lt;actions/&gt; element, which specifies the details of what the allowed actions are for this stage of execution. Each element within &lt;action/&gt; matches a possible value for the &lt;command/&gt; element's "action" attribute. The "execute" attribute defines which of the included actions is considered the equivalent to "execute" for this stage. In the above example, the only allowed action is to progress to the next stage, which is also the default.</p>
  367. <p>The requester then submits the form, maintaining the command node and sessionid:</p>
  368. <example caption='Execute command request (stage 2)'><![CDATA[
  369. <iq type='set' to='responder@domain' id='exec2'>
  370. <command xmlns=''
  371. sessionid='config:20020923T213616Z-700'
  372. node='config'>
  373. <x xmlns='jabber:x:data' type='submit'>
  374. <field var='service'>
  375. <value>httpd</value>
  376. </field>
  377. </x>
  378. </command>
  379. </iq>
  380. ]]></example>
  381. <p>The responder then provides the next stage's form in the result <note>Note that the second stage can be reverted to the first stage or completed (signaled by the inclusion of the &lt;prev/&gt; and &lt;complete/&gt; elements), and that the default action is to complete execution (signaled by the "execute" attribute's value of "complete").</note>:</p>
  382. <example caption='Execute command result (stage 2)'><![CDATA[
  383. <iq type='result' from='responder@domain' to='requester@domain' id='exec2'>
  384. <command xmlns=''
  385. sessionid='config:20020923T213616Z-700'
  386. node='config'
  387. status='executing'>
  388. <actions execute='complete'>
  389. <prev/>
  390. <complete/>
  391. </actions>
  392. <x xmlns='jabber:x:data' type='form'>
  393. <title>Configure Service</title>
  394. <instructions>
  395. Please select the run modes and state for 'httpd'.
  396. </instructions>
  397. <field var='runlevel' label='Run Modes' type='list-multi'>
  398. <value>3</value>
  399. <value>5</value>
  400. <option label='Single-User'><value>1</value></option>
  401. <option label='Non-Networked Multi-User'><value>2</value></option>
  402. <option label='Full Multi-User'><value>3</value></option>
  403. <option label='X-Window'><value>5</value></option>
  404. </field>
  405. <field var='state' label='Run State' type='list-single'>
  406. <value>off</value>
  407. <option label='Active'><value>off</value></option>
  408. <option label='Inactive'><value>on</value></option>
  409. </field>
  410. </x>
  411. </command>
  412. </iq>
  413. ]]></example>
  414. <p>The requester then submits the second stage's form, again maintaining the node and sessionid:</p>
  415. <example caption='Execute command request (stage 3)'><![CDATA[
  416. <iq type='set' to='responder@domain' id='exec3'>
  417. <command xmlns=''
  418. sessionid='config:20020923T213616Z-700'
  419. node='config'>
  420. <x xmlns='jabber:x:data' type='submit'>
  421. <field var='mode'>
  422. <value>3</value>
  423. </field>
  424. <field var='state'>
  425. <value>on</value>
  426. </field>
  427. </x>
  428. </command>
  429. </iq>
  430. ]]></example>
  431. <example caption='Execute command result (stage 3)'><![CDATA[
  432. <iq type='result' from='responder@domain' to='requester@domain' id='exec3'>
  433. <command xmlns=''
  434. sessionid='config:20020923T213616Z-700'
  435. node='config'
  436. status='completed'>
  437. <note type='info'>Service 'httpd' has been configured.</note>
  438. </command>
  439. </iq>
  440. ]]></example>
  441. <p>If the requester wishes to revert to the previous stage, it sends an &IQ; with the command's node and sessionid, and "action='prev'":</p>
  442. <example caption='Execute command request (revert from stage 2 to stage 1)'><![CDATA[
  443. <iq type='set' to='responder@domain' id='exec2'>
  444. <command xmlns=''
  445. sessionid='config:20020923T213616Z-700'
  446. node='config'
  447. action='prev'/>
  448. </iq>
  449. ]]></example>
  450. <p>If the responder accepts this, it responds with the previous stage's command <note>The responder MAY present "remembered" field values, but doing so is OPTIONAL.</note>:</p>
  451. <example caption='Execute command result (revert from stage 2 to stage 1)'><![CDATA[
  452. <iq type='result' from='responder@domain' to='requester@domain' id='exec2'>
  453. <command xmlns=''
  454. sessionid='config:20020923T213616Z-700'
  455. node='config'
  456. status='executing'>
  457. <actions execute='next'>
  458. <next/>
  459. </actions>
  460. <x xmlns='jabber:x:data' type='form'>
  461. <title>Configure Service</title>
  462. <instructions>
  463. Please select the service to configure.
  464. </instructions>
  465. <field var='service' label='Service' type='list-single'>
  466. <value>httpd</value>
  467. <option><value>httpd</value></option>
  468. <option><value>jabberd</value></option>
  469. <option><value>postgresql</value></option>
  470. </field>
  471. </x>
  472. </command>
  473. </iq>
  474. ]]></example>
  475. </section3>
  476. <section3 topic='Canceling' anchor='cancel'>
  477. <p>In the case where a command has multiple stages, the requester may wish to cancel at some point. To cancel, the requester sends the continuing command request with an "action='cancel'":</p>
  478. <example caption='Execute command request (stage 2; canceling)'><![CDATA[
  479. <iq type='set' to='responder@domain' id='exec3'>
  480. <command xmlns=''
  481. sessionid='config:20020923T213616Z-700'
  482. node='config'
  483. action='cancel'/>
  484. </iq>
  485. ]]></example>
  486. <p>This enables the responder to free any resources allocated during the process. The responder MUST reply with the success of the command:</p>
  487. <example caption='Execute command result (stage 2; canceled)'><![CDATA[
  488. <iq type='result' from='responder@domain' to='requester@domain' id='exec3'>
  489. <command xmlns=''
  490. sessionid='config:20020923T213616Z-700'
  491. node='config'
  492. status='canceled'/>
  493. </iq>
  494. ]]></example>
  495. </section3>
  496. </section2>
  497. </section1>
  498. <section1 topic='Implementation Notes' anchor='impl'>
  499. <section2 topic='Defined/Required Command Nodes' anchor='impl-req'>
  500. <p>All commands used in the above examples are for illustrative purposes only. There are no predefined or required commands.</p>
  501. </section2>
  502. <section2 topic='Command Nodes' anchor='impl-nodes'>
  503. <p>Each command is identified by its 'node' attribute. This matches the 'node' attribute from the service discovery &lt;item/&gt; element. Service Discovery requires that all 'node' values be unique within a given JID. This document requires that the 'node' value used in &lt;command/&gt; exactly match the value used in the &lt;item/&gt; element. It is the responsibility of the responder implementation to ensure each command's node is unique for their JID.</p>
  504. </section2>
  505. <section2 topic='Session Lifetime' anchor='impl-session'>
  506. <p>The execution of a command exists within the concept of a session. Each session is identified by the 'sessionid' attribute, and SHOULD be valid only between one requester/responder pair. The responder is responsible for determining the session lifetime, with some help from the requester.</p>
  507. <p>The requester starts a new session for a command by simply sending a &lt;command/&gt; with the 'node' attribute (and optionally the 'status' attribute with a value of "execute"). Once the 'sessionid' attribute is given to the requester, it is the requester's responsibility to maintain it for the session's lifetime. A session ends when the responder sends a &lt;command status='completed'/&gt; or the requester sends a &lt;command action='cancel'/&gt; with the provided 'sessionid' value.</p>
  508. <p>Once a session has ended, its 'sessionid' value SHOULD NOT be used again. It is the responder's responsibility to ensure that each 'sessionid' value is unique.</p>
  509. <p>It may be possible for a requester to be executing more than one session of the same command with a given responder. If the responder does not allow more than one session of the same command with the same requester, the responder MUST return a &notallowed; error (see &xep0086;).</p>
  510. </section2>
  511. <section2 topic='Command Actions' anchor='impl-actions'>
  512. <p>The result for each stage (other than the last) of a command's execution SHOULD include an &lt;actions/&gt; element. The user-agent can use this information to present a more-intelligent user interface, such as a "druid" or "wizard".</p>
  513. <p>For a user-agent, a typical interpretation of the &lt;actions/&gt; information (or lack thereof) would be the following:</p>
  514. <ol>
  515. <li>The action "cancel" is always allowed.</li>
  516. <li>If there is no &lt;actions/&gt; element, the user-agent can use a single-stage dialog or view.
  517. <ul>
  518. <li>The action "execute" is equivalent to the action "complete".</li>
  519. </ul>
  520. </li>
  521. <li>If there is an &lt;actions/&gt; element, the user-agent usually uses a multi-stage dialog or view, such as a wizard.
  522. <ul>
  523. <li>The action "execute" is always allowed, and is equivalent to the action "next".</li>
  524. <li>The "prev" action is typically the "back" or "previous" button or option in a wizard. If &lt;prev/&gt; is not contained by the &lt;actions/&gt;, it is disabled.</li>
  525. <li>The "next" action is typically the "next" button or option in a wizard. If &lt;next/&gt; is not contained by the &lt;actions/&gt;, it is disabled.</li>
  526. <li>The "complete" action is typically the "finish" or "done" button or option in a wizard. If &lt;complete/&gt; is not contained by the &lt;actions/&gt;, it is disabled.</li>
  527. <li>If the &lt;actions/&gt; possesses the "execute" attribute, that value is the default button or option. If the &lt;actions/&gt; does not possess the "execute" attribute, there is no default button or option.</li>
  528. </ul>
  529. </li>
  530. </ol>
  531. <p>Responders SHOULD use the following guidelines when providing &lt;actions/&gt;:</p>
  532. <ul>
  533. <li>The "execute" attribute SHOULD NOT specify a value that does not match one of the allowed actions.</li>
  534. </ul>
  535. </section2>
  536. <section2 topic='Command Payloads' anchor='impl-payloads'>
  537. <p>On its own, the &lt;command/&gt; has very little usefulness. It relies on its payload to give full meaning to its use. The payload can be elements in any namespace that makes sense and is understood (such as "jabber:x:data"), and/or one or more &lt;note/&gt; elements. Any namespaced elements can be used within a &lt;command/&gt;. The only limitations are that the elements not require certain parent elements (such as &IQ;), or specifically allow for &lt;command/&gt; qualified by the "" namespace as a possible parent element.</p>
  538. <p>As a general rule, the payload is provided only by the responder. The primary exception to this rule is with the "jabber:x:data" extension (and other namespaces with similar semantics). In this case, if the responder provides a form to submit, the requester SHOULD respond with the submitted data (using the semantics from XEP-0004).</p>
  539. <p>When the precedence of these payload elements becomes important (such as when both "jabber:x:data" and "jabber:x:oob" elements are present), the order of the elements SHOULD be used. Those elements that come earlier in the child list take precedence over those later in the child list. The requester SHOULD consider those elements qualified by the same namespace as having an equivalent precedence (such as if multiple "jabber:x:oob" elements are included).</p>
  540. <section3 topic='Use of Data Forms' anchor='impl-forms'>
  541. <p>When the payload is "jabber:x:data", there are certain conditions applied. The requester SHOULD NOT use a "jabber:x:data" type other than "submit". Responders SHOULD consider any &lt;x type='cancel'/&gt; to be &lt;x type='submit'/&gt;.</p>
  542. </section3>
  543. </section2>
  544. <section2 topic='Commands Successful/Failed' anchor='impl-commands'>
  545. <p>The status of command execution signals only if the command is executing, has been completed, or been canceled. If completed, the "status" attribute does not specify if it completed successfully or not. If a command completes but fails, the responder MUST include at least one &lt;note type='error'/&gt; with the &lt;command status='completed'/&gt; it returns.</p>
  546. </section2>
  547. <section2 topic='Internationalization and Localization' anchor='impl-i18n'>
  548. <p>The requester SHOULD provide its locale information using the "xml:lang" attribute on either the &IQ; (RECOMMENDED) or &lt;command/&gt; element. Each execution session (identified by the "sessionid" attribute) SHOULD use only one language/locale, and requesters and responders SHOULD assume the first language/locale specified applies. The responder SHOULD specify the language/locale with the every command session's response.</p>
  549. <example caption='Execute command request (with language/locale)'><![CDATA[
  550. <iq type='set' to='responder@domain' id='exec1' xml:lang='en-us'>
  551. <command xmlns=''
  552. node='list'
  553. action='execute'/>
  554. </iq>
  555. ]]></example>
  556. <example caption="Execute command result (with language/locale)"><![CDATA[
  557. <iq type='result'
  558. from='responder@domain'
  559. to='requester@domain'
  560. id='exec1'
  561. xml:lang='en-us'>
  562. <command xmlns=''
  563. sessionid='list:20020923T213616Z-700'
  564. node='list'
  565. status='completed'>
  566. <x xmlns='jabber:x:data' type='result'>
  567. <title>Available Services</title>
  568. <reported>
  569. <field var='service' label='Service'/>
  570. <field var='runlevel-1' label='Single-User mode'/>
  571. <field var='runlevel-2' label='Non-Networked Multi-User mode'/>
  572. <field var='runlevel-3' label='Full Mult-User mode'/>
  573. <field var='runlevel-5' label='X-Window mode'/>
  574. </reported>
  575. <item>
  576. <field var='service'><value>httpd</value></field>
  577. <field var='runlevel-1'><value>off</value></field>
  578. <field var='runlevel-2'><value>off</value></field>
  579. <field var='runlevel-3'><value>on</value></field>
  580. <field var='runlevel-5'><value>on</value></field>
  581. </item>
  582. <item>
  583. <field var='service'><value>postgresql</value></field>
  584. <field var='runlevel-1'><value>off</value></field>
  585. <field var='runlevel-2'><value>off</value></field>
  586. <field var='runlevel-3'><value>on</value></field>
  587. <field var='runlevel-5'><value>on</value></field>
  588. </item>
  589. <item>
  590. <field var='service'><value>jabberd</value></field>
  591. <field var='runlevel-1'><value>off</value></field>
  592. <field var='runlevel-2'><value>off</value></field>
  593. <field var='runlevel-3'><value>on</value></field>
  594. <field var='runlevel-5'><value>on</value></field>
  595. </item>
  596. </x>
  597. </command>
  598. </iq>
  599. ]]></example>
  600. <p>Within the "" schema, the language/locale applies only to the human-readable character data for &lt;info/&gt; elements. It SHOULD also apply to all payload elements, appropriate to their respective specifications.</p>
  601. <p>Responders MUST take this into consideration, and properly account for the language/locale settings within payloads. If the responder cannot accomodate the requested language/locale, it SHOULD respond with a &lt;bad-request/&gt; (&lt;bad-locale/&gt;) error condition.</p>
  602. <example caption='Execute command request (with language/locale)'><![CDATA[
  603. <iq type='set' to='responder@domain' id='exec1' xml:lang='fr-ca'>
  604. <command xmlns=''
  605. node='list'
  606. action='execute'/>
  607. </iq>
  608. ]]></example>
  609. <example caption='Execute command failed result (with language/locale)'><![CDATA[
  610. <iq type='error' from='responder@domain' to='requester@domain/resource' id='exec1'>
  611. <command xmlns=''
  612. node='list'
  613. action='execute'
  614. xml:lang='fr-ca'/>
  615. <error type='modify' code='400'>
  616. <bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  617. <bad-locale xmlns=''/>
  618. </error>
  619. </iq>
  620. ]]></example>
  621. </section2>
  622. </section1>
  623. <section1 topic='Formal Description' anchor='desc'>
  624. <p>The focal element in x-commands is &lt;command/&gt;. It is the element used to guide the process, and the element used to report command options.</p>
  625. <section2 topic='&lt;command/&gt; Element' anchor='desc-command'>
  626. <p>Each &lt;command/&gt; contains attributes for a node, a "session id", an action type, a status type, and a language/locale specifier. A command MAY contain zero or more &lt;note/&gt; elements and MAY contain other namespaced elements as payload. Elements qualified by the "jabber:x:data" and "jabber:x:oob" namespaces are the typical payload.</p>
  627. <p>The "node" attribute uniquely identifies the command. This attribute MUST be present.</p>
  628. <p>The "sessionid" attribute helps to track a command execution across multiple stages. This attribute MUST be present for subsequent stages, and the responder SHOULD initialize (if not provided) or maintain this attribute. The value of this attribute MUST NOT be empty or null, but otherwise can be any string value. This value MUST be maintained by a requester while executing a command.</p>
  629. <p>The "status" attribute describes the current status of this command. This value SHOULD be set only by the responder. If specified by the requester, the responder MUST ignore it. The value of "status" MUST be one of the following:</p>
  630. <table caption='Possible "status" values'>
  631. <tr>
  632. <th>Status</th>
  633. <th>Description</th>
  634. </tr>
  635. <tr>
  636. <td>executing</td>
  637. <td>The command is being executed.</td>
  638. </tr>
  639. <tr>
  640. <td>completed</td>
  641. <td>The command has completed. The command session has ended.</td>
  642. </tr>
  643. <tr>
  644. <td>canceled</td>
  645. <td>The command has been canceled. The command session has ended.</td>
  646. </tr>
  647. </table>
  648. <p>The "action" attribute specifies the action to undertake with the given command. This value SHOULD be set only by the requester. If specified by the responder, the requester MUST ignore it. The value of "action" MUST be one of the following:</p>
  649. <table caption='Possible "action" values'>
  650. <tr>
  651. <th>Action</th>
  652. <th>Description</th>
  653. </tr>
  654. <tr>
  655. <td>execute</td>
  656. <td>The command should be executed or continue to be executed. This is the default value.</td>
  657. </tr>
  658. <tr>
  659. <td>cancel</td>
  660. <td>The command should be canceled.</td>
  661. </tr>
  662. <tr>
  663. <td>prev</td>
  664. <td>The command should be digress to the previous stage of execution.</td>
  665. </tr>
  666. <tr>
  667. <td>next</td>
  668. <td>The command should progress to the next stage of execution.</td>
  669. </tr>
  670. <tr>
  671. <td>complete</td>
  672. <td>The command should be completed (if possible).</td>
  673. </tr>
  674. </table>
  675. <p>The "xml:lang" attribute specifies the language/locale this &lt;command/&gt; is intended for. This attribute MAY be specified by the requester to request a specific language/locale, and SHOULD be included by the responder to indicate the language/locale in use.</p>
  676. <p>The children of a &lt;command/&gt; element (other than &lt;actions/&gt; and &lt;note/&gt;) pertain to the command's execution. The order of these elements denote their precedence, so that those elements earlier in the list have higher precedence.</p>
  677. </section2>
  678. <section2 topic='&lt;actions/&gt; Element' anchor='desc-actions'>
  679. <p>The allowed actions for a particular stage of execution are provided by the &lt;actions/&gt; element. This element SHOULD be provided by the responder if the command's execution is not complete, and SHOULD NOT ever be provided by the requester. It contains a single attribute to specify what the "execute" action equals. It contains child elements to specify what the allowed actions are.</p>
  680. <p>The "execute" attribute specifies what the action "execute" is equivalent to. In user-agent interfaces, this represents the default behavior. This attribute MAY be specified by the responder, and MUST equal one of the "action" attribute values for &lt;command/&gt;. The value of this attribute SHOULD match the local name of one of the contained child elements.</p>
  681. <p>The child elements contained by &lt;action/&gt; specify the allowed actions. The name of each child element MUST be one of the following:</p>
  682. <ul>
  683. <li>prev</li>
  684. <li>next</li>
  685. <li>complete</li>
  686. </ul>
  687. </section2>
  688. <section2 topic='&lt;note/&gt; Element' anchor='desc-note'>
  689. <p>Notes about the current status of commands are provided by &lt;note/&gt; elements. This element contains information about current conditions in a command sequence. This element has an attribute that defines the type of note. The body of a &lt;note/&gt; should contain a user-readable text message.</p>
  690. <p>The "type" attribute specifies the severity of the note. This attribute is OPTIONAL, and implies "info" if not present. The value of this attribute MUST be one of the following:</p>
  691. <table caption='Possible "type" values'>
  692. <tr>
  693. <th>Type</th>
  694. <th>Description</th>
  695. </tr>
  696. <tr>
  697. <td>info</td>
  698. <td>The note is informational only. This is not really an exceptional condition.</td>
  699. </tr>
  700. <tr>
  701. <td>warn</td>
  702. <td>The note indicates a warning. Possibly due to illogical (yet valid) data.</td>
  703. </tr>
  704. <tr>
  705. <td>error</td>
  706. <td>The note indicates an error. The text should indicate the reason for the error.</td>
  707. </tr>
  708. </table>
  709. </section2>
  710. <section2 topic='Possible Errors' anchor='desc-errors'>
  711. <p>To simplify the discussion on error conditions, this document uses the following mapping between namespace URIs and namespace prefixes <note>This mapping is provided solely for the purpose of simplifying this discussion.</note>:</p>
  712. <table caption='Namespace Mappings'>
  713. <tr>
  714. <th>Prefix</th>
  715. <th>URI</th>
  716. </tr>
  717. <tr>
  718. <td>xmpp</td>
  719. <td>urn:ietf:params:xml:ns:xmpp-stanzas</td>
  720. </tr>
  721. <tr>
  722. <td>cmd</td>
  723. <td></td>
  724. </tr>
  725. </table>
  726. <p>Below are the possible errors that can occur during execution.</p>
  727. <table caption='Command execution errors'>
  728. <tr>
  729. <th>Error Type</th>
  730. <th>General Condition</th>
  731. <th>Specific Condition</th>
  732. <th>Description</th>
  733. </tr>
  734. <tr>
  735. <td>modify</td>
  736. <td>&lt;xmpp:bad-request/&gt;</td>
  737. <td>&lt;cmd:malformed-action/&gt;</td>
  738. <td>The responding JID does not understand the specified action.</td>
  739. </tr>
  740. <tr>
  741. <td>modify</td>
  742. <td>&lt;xmpp:bad-request/&gt;</td>
  743. <td>&lt;cmd:bad-action/&gt;</td>
  744. <td>The responding JID cannot accept the specified action.</td>
  745. </tr>
  746. <tr>
  747. <td>modify</td>
  748. <td>&lt;xmpp:bad-request/&gt;</td>
  749. <td>&lt;cmd:bad-locale/&gt;</td>
  750. <td>The responding JID cannot accept the specified language/locale.</td>
  751. </tr>
  752. <tr>
  753. <td>modify</td>
  754. <td>&lt;xmpp:bad-request/&gt;</td>
  755. <td>&lt;cmd:bad-payload/&gt;</td>
  756. <td>The responding JID cannot accept the specified payload (e.g. the data form did not provide one or more required fields).</td>
  757. </tr>
  758. <tr>
  759. <td>modify</td>
  760. <td>&lt;xmpp:bad-request/&gt;</td>
  761. <td>&lt;cmd:bad-sessionid/&gt;</td>
  762. <td>The responding JID cannot accept the specified sessionid.</td>
  763. </tr>
  764. <tr>
  765. <td>cancel</td>
  766. <td>&lt;xmpp:not-allowed/&gt;</td>
  767. <td>&lt;cmd:session-expired/&gt;</td>
  768. <td>The requesting JID specified a sessionid that is no longer active (either because it was completed, canceled, or timed out).</td>
  769. </tr>
  770. <tr>
  771. <td>cancel</td>
  772. <td>&lt;xmpp:forbidden/&gt;</td>
  773. <td>NONE</td>
  774. <td>The requesting JID is not allowed to execute the command.</td>
  775. </tr>
  776. <tr>
  777. <td>cancel</td>
  778. <td>&lt;xmpp:item-not-found/&gt;</td>
  779. <td>NONE</td>
  780. <td>The responding JID cannot find the requested command node.</td>
  781. </tr>
  782. <tr>
  783. <td>cancel</td>
  784. <td>&lt;xmpp:feature-not-implemented/&gt;</td>
  785. <td>NONE</td>
  786. <td>The responding JID does not support "".</td>
  787. </tr>
  788. </table>
  789. </section2>
  790. </section1>
  791. <section1 topic='Security Considerations' anchor='sec'>
  792. <p>Determining when a command can be executed based on permissions or rights is considered outside the scope of this document. Although such mechanisms are considered specific to the application and/or implementation of this document, future specifications may address these concerns.</p>
  793. <p>When processing reported commands, the requester SHOULD consider any command node that does not match the JID of the responder to be suspicious, and ignore those command nodes. Responders MUST report their own command nodes only, and not the command nodes of other entities. This can help prevent limited cases of spoofing and "social engineering".</p>
  794. </section1>
  795. <section1 topic='IANA Considerations' anchor='iana'>
  796. <p>This document requires no interaction with &IANA;.</p>
  797. </section1>
  798. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  799. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  800. <p>The &REGISTRAR; includes '' in its registry of protocol namespaces.</p>
  801. </section2>
  802. <section2 topic='Service Discovery Identities' anchor='registrar-disco-identity'>
  803. <p>The XMPP Registrar includes "automation" in its registry of Service Discovery categories for use for any entities and nodes that provide automated or programmed interaction. This category has the following types:</p>
  804. <table caption='Types for Category "automation"'>
  805. <tr>
  806. <th>Type</th>
  807. <th>Description</th>
  808. </tr>
  809. <tr>
  810. <td>command-list</td>
  811. <td>The node for a list of commands; valid only for the node "".</td>
  812. </tr>
  813. <tr>
  814. <td>command-node</td>
  815. <td>A node for a specific command; the 'node' attribute uniquely identifies the command.</td>
  816. </tr>
  817. </table>
  818. <p>The registry submission is as follows:</p>
  819. <code><![CDATA[
  820. <category>
  821. <name>automation</name>
  822. <desc>The "automation" category consists of entities and nodes that provide automated or programmed interaction.</desc>
  823. <type>
  824. <name>command-list</name>
  825. <desc>The node for a list of commands; valid only for the node ""</desc>
  826. <doc>XEP-0050</doc>
  827. </type>
  828. <type>
  829. <name>command-node</name>
  830. <desc>A node for a specific command; the 'node' attribute uniquely identifies the command</desc>
  831. <doc>XEP-0050</doc>
  832. </type>
  833. </category>
  834. ]]></code>
  835. </section2>
  836. <section2 topic='Well-Known Service Discovery Nodes' anchor='registrar-disco-nodes'>
  837. <p>The XMPP Registrar includes "" in its registry of well-known Service Discovery nodes.</p>
  838. </section2>
  839. <section2 topic='URI Query Types' anchor='registrar-querytypes'>
  840. <p>As authorized by &xep0147;, the XMPP Registrar maintains a registry of queries and key-value pairs for use in XMPP URIs (see &QUERYTYPES;).</p>
  841. <p>The "command" querytype is defined herein for interaction with entities that support the ad-hoc command protocol, with keys of "action" and "node".</p>
  842. <example caption='Command Action: IRI/URI'><![CDATA[
  844. ]]></example>
  845. <example caption='Command Action: Resulting Stanza'><![CDATA[
  846. <iq to='' type='set'>
  847. <command xmlns='' node='stats'/>
  848. </iq>
  849. ]]></example>
  850. <p>The following submission registers the "command" querytype.</p>
  851. <code><![CDATA[
  852. <querytype>
  853. <name>command</name>
  854. <proto></proto>
  855. <desc>enables completion of ad-hoc commands</desc>
  856. <doc>XEP-0050</doc>
  857. <keys>
  858. <key>
  859. <name>action</name>
  860. <desc>the ad-hoc commands action type</desc>
  861. <values>
  862. <value>
  863. <name>cancel</name>
  864. <desc>a request to cancel processing of the command</desc>
  865. </value>
  866. <value>
  867. <name>complete</name>
  868. <desc>a request to complete processing of the command</desc>
  869. </value>
  870. <value>
  871. <name>execute</name>
  872. <desc>a request to execute the command (the default implied action)</desc>
  873. </value>
  874. <value>
  875. <name>next</name>
  876. <desc>a request to move to the next command in a series</desc>
  877. </value>
  878. <value>
  879. <name>prev</name>
  880. <desc>a request to move to the previous command in a series</desc>
  881. </value>
  882. </values>
  883. </key>
  884. <key>
  885. <name>node</name>
  886. <desc>the command node</desc>
  887. </key>
  888. </keys>
  889. </querytype>
  890. ]]></code>
  891. </section2>
  892. </section1>
  893. <section1 topic='XML Schema' anchor='schema'>
  894. <code><![CDATA[
  895. <?xml version='1.0' encoding='UTF-8'?>
  896. <xs:schema
  897. xmlns:xs=''
  898. targetNamespace=''
  899. xmlns=''
  900. elementFormDefault='qualified'>
  901. <xs:annotation>
  902. <xs:documentation>
  903. The protocol documented by this schema is defined in
  904. XEP-0050:
  905. </xs:documentation>
  906. </xs:annotation>
  907. <xs:import namespace=''
  908. schemaLocation=''/>
  909. <xs:element name='command'>
  910. <xs:complexType>
  911. <xs:choice>
  912. <xs:element ref='actions' minOccurs='0'/>
  913. <xs:element ref='note' minOccurs='0' maxOccurs='unbounded'/>
  914. <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
  915. </xs:choice>
  916. <xs:attribute name='action' use='optional'>
  917. <xs:simpleType>
  918. <xs:restriction base='xs:NCName'>
  919. <xs:enumeration value='cancel'/>
  920. <xs:enumeration value='complete'/>
  921. <xs:enumeration value='execute'/>
  922. <xs:enumeration value='next'/>
  923. <xs:enumeration value='prev'/>
  924. </xs:restriction>
  925. </xs:simpleType>
  926. </xs:attribute>
  927. <xs:attribute name='node' type='xs:string' use='required'/>
  928. <xs:attribute name='sessionid' type='xs:string' use='optional'/>
  929. <xs:attribute name='status' use='optional'>
  930. <xs:simpleType>
  931. <xs:restriction base='xs:NCName'>
  932. <xs:enumeration value='canceled'/>
  933. <xs:enumeration value='completed'/>
  934. <xs:enumeration value='executing'/>
  935. </xs:restriction>
  936. </xs:simpleType>
  937. </xs:attribute>
  938. <xs:attribute ref='xml:lang' use='optional'/>
  939. </xs:complexType>
  940. </xs:element>
  941. <xs:element name='actions'>
  942. <xs:complexType>
  943. <xs:sequence>
  944. <xs:element name='prev' type='empty' minOccurs='0'/>
  945. <xs:element name='next' type='empty' minOccurs='0'/>
  946. <xs:element name='complete' type='empty' minOccurs='0'/>
  947. </xs:sequence>
  948. <xs:attribute name='execute' use='optional'>
  949. <xs:simpleType>
  950. <xs:restriction base='xs:NCName'>
  951. <xs:enumeration value='complete'/>
  952. <xs:enumeration value='next'/>
  953. <xs:enumeration value='prev'/>
  954. </xs:restriction>
  955. </xs:simpleType>
  956. </xs:attribute>
  957. </xs:complexType>
  958. </xs:element>
  959. <xs:element name='note'>
  960. <xs:complexType>
  961. <xs:simpleContent>
  962. <xs:extension base='xs:string'>
  963. <xs:attribute name='type' use='optional'>
  964. <xs:simpleType>
  965. <xs:restriction base='xs:NCName'>
  966. <xs:enumeration value='error'/>
  967. <xs:enumeration value='info'/>
  968. <xs:enumeration value='warn'/>
  969. </xs:restriction>
  970. </xs:simpleType>
  971. </xs:attribute>
  972. </xs:extension>
  973. </xs:simpleContent>
  974. </xs:complexType>
  975. </xs:element>
  976. <xs:element name='bad-action' type='empty'/>
  977. <xs:element name='bad-locale' type='empty'/>
  978. <xs:element name='bad-payload' type='empty'/>
  979. <xs:element name='bad-sessionid' type='empty'/>
  980. <xs:element name='malformed-action' type='empty'/>
  981. <xs:element name='session-expired' type='empty'/>
  982. <xs:simpleType name='empty'>
  983. <xs:restriction base='xs:string'>
  984. <xs:enumeration value=''/>
  985. </xs:restriction>
  986. </xs:simpleType>
  987. </xs:schema>
  988. ]]></code>
  989. </section1>
  990. <section1 topic='Acknowledgements' anchor='acks'>
  991. <p>Many thanks to Florian Schmaus, Christian Schudt and Anno van Vliet
  992. for their input and feedback on this specification.</p>
  993. </section1>
  994. </xep>