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-0322.xml 138KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!-- TODO: Add sequence diagrams. -->
  3. <!-- TODO: Add schema for <message> and <iq>. -->
  4. <!-- TODO: Intermittent connections and reconnection to previous EXI session, reutilizing options, string tables, etc. -->
  5. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  6. <!ENTITY % ents SYSTEM 'xep.ent'>
  7. %ents;
  8. ]>
  9. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  10. <xep>
  11. <header>
  12. <title>Efficient XML Interchange (EXI) Format</title>
  13. <abstract>This specification describes how EXI compression can be used in XMPP networks.</abstract>
  14. &LEGALNOTICE;
  15. <number>0322</number>
  16. <status>Deferred</status>
  17. <type>Standards Track</type>
  18. <sig>Standards</sig>
  19. <approver>Council</approver>
  20. <dependencies>
  21. <spec>XMPP Core</spec>
  22. <spec>XEP-0001</spec>
  23. <spec>XEP-0138</spec>
  24. </dependencies>
  25. <supersedes/>
  26. <supersededby/>
  27. <shortname>exi</shortname>
  28. &peterwaher;
  29. <author>
  30. <firstname>Yusuke</firstname>
  31. <surname>DOI</surname>
  32. <email>yusuke.doi@toshiba.co.jp</email>
  33. <jid>yusuke.doi@gmail.com</jid>
  34. <uri>http://www.linkedin.com/in/yusukedoi</uri>
  35. </author>
  36. <revision>
  37. <version>0.6.0</version>
  38. <date>2018-01-25</date>
  39. <initials>XEP Editor (jwi)</initials>
  40. <remark>Defer due to lack of activity.</remark>
  41. </revision>
  42. <revision>
  43. <version>0.5.1</version>
  44. <date>2016-11-02</date>
  45. <initials>ssw</initials>
  46. <remark>
  47. <p>Formatting and XML fixes.</p>
  48. </remark>
  49. </revision>
  50. <revision>
  51. <version>0.5</version>
  52. <date>2015-11-09</date>
  53. <initials>pw</initials>
  54. <remark>
  55. <p>Updated contact information.</p>
  56. <p>Updated example JIDs to example.org</p>
  57. </remark>
  58. </revision>
  59. <revision>
  60. <version>0.4</version>
  61. <date>2014-03-10</date>
  62. <initials>pw</initials>
  63. <remark>
  64. <p>XMPP Schema namespaces, byte sizes and hashes have been updated</p>
  65. <p>A section with links for more information has been added.</p>
  66. </remark>
  67. </revision>
  68. <revision>
  69. <version>0.3</version>
  70. <date>2013-07-19</date>
  71. <initials>pw, yd</initials>
  72. <remark>
  73. <p>Added examples of communication in alternate bindings.</p>
  74. <p>Default parameter, canonical namespace, and reserved schemaId of EXI encoding are revised.</p>
  75. <p>Added clarifications on use of streamStart, streamEnd elements with namespace prefix mappings.</p>
  76. <p>EXI options are now described in the context of use in XMPP communication.</p>
  77. <p>A bug in setupResponse element type definition is fixed.</p>
  78. <p>Changed domanname schemavault.se used in schema download examples to schemavault.example.org to clarify this is an example.</p>
  79. </remark>
  80. </revision>
  81. <revision>
  82. <version>0.2</version>
  83. <date>2013-06-27</date>
  84. <initials>pw, yd</initials>
  85. <remark>
  86. <p>Added support for a binary binding.</p>
  87. <p>Changed namespace urn:xmpp:sn to urn:xmpp:iot</p>
  88. <p>Added streamStart and streamEnd elements.</p>
  89. <p>Added central XMPP schemas used for XMPP communication.</p>
  90. <p>Added references to core XMPP schemas in examples.</p>
  91. <p>
  92. Added quick setup attributes: <strong>configurationId</strong>, <strong>configurationLocation</strong>.
  93. </p>
  94. </remark>
  95. </revision>
  96. <revision>
  97. <version>0.1</version>
  98. <date>2013-04-16</date>
  99. <initials>psa</initials>
  100. <remark>
  101. <p>Initial published version approved by the XMPP Council.</p>
  102. </remark>
  103. </revision>
  104. <revision>
  105. <version>0.0.4</version>
  106. <date>2013-03-19</date>
  107. <initials>pw</initials>
  108. <remark>
  109. <p>Added support for uploading EXI-compressed schema files.</p>
  110. </remark>
  111. </revision>
  112. <revision>
  113. <version>0.0.3</version>
  114. <date>2013-03-15</date>
  115. <initials>pw</initials>
  116. <remark>
  117. <p>Added definition: EXI body.</p>
  118. <p>Added note regarding preserverance of namespace prefixes.</p>
  119. <p>Corrected the language.</p>
  120. </remark>
  121. </revision>
  122. <revision>
  123. <version>0.0.2</version>
  124. <date>2013-03-13</date>
  125. <initials>pw</initials>
  126. <remark>
  127. <p>Added support for session-wide buffers and string tables.</p>
  128. </remark>
  129. </revision>
  130. <revision>
  131. <version>0.0.1</version>
  132. <date>2013-03-12</date>
  133. <initials>pw</initials>
  134. <remark>
  135. <p>First draft.</p>
  136. </remark>
  137. </revision>
  138. </header>
  139. <section1 topic='Introduction' anchor='intro'>
  140. <p>
  141. The Efficient XML Interchange (EXI) Format <note>
  142. Efficient XML Interchange (EXI) Format &lt;<link url='http://www.w3.org/TR/exi/'>http://www.w3.org/TR/exi/</link>&gt;.
  143. </note> is an
  144. efficient way to compress XML documents and XML fragments. This document provides information on how EXI can be used in XMPP streams to efficiently compress data transmitted between
  145. the server and the client. For certain applications (like applications in sensor networks) EXI is a vital component, decreasing packet size enabling sensors with limited memory to
  146. communicate efficiently. The strong support in EXI for generating efficient stubcodes is also vital to build efficient code in constrained devices.
  147. </p>
  148. <p>
  149. Activating EXI compression requires a handshake to take place prior, where the server and client agree on a set of parameters. Some of these parameters may increase the compression ratio,
  150. at the cost of processing power and readability. These parameters include:
  151. </p>
  152. <ul>
  153. <li>Schemas to use.</li>
  154. <li>EXI version number.</li>
  155. <li>Data alignment (bit-packed, byte-alignment, pre-compression).</li>
  156. <li>If EXI-compressed data should be further compressed using additional compression.</li>
  157. <li>Strict or loose adherence to schemas.</li>
  158. <li>If comments, processing instructions, dtd:s, prefixes, lexical values, etc. should be preserved.</li>
  159. <li>If self-contained elements should be allowed.</li>
  160. <li>Alternate data type representations for types values.</li>
  161. <li>Block size for EXI compression.</li>
  162. <li>Maximum string length of value content items in string tables.</li>
  163. <li>Value partition capacity.</li>
  164. </ul>
  165. <p>
  166. These parameters will be discussed in greater depth in the following sections. There are also default values that can be used to commence evaluating EXI compression.
  167. </p>
  168. <p>
  169. The single most important property to agree on however, is the set of schemas to use during EXI compression. EXI compresses XML much more efficiently if schemas exist
  170. describing the format of the expected XML. Since the server is not supposed to know all possible XML schemas, a mechanism is provided in this document whereby schemas can be
  171. interchanged, so that the server can adapt its compression to the needs of the client.
  172. </p>
  173. <p>
  174. EXI can be used through two bindings:
  175. </p>
  176. <ul>
  177. <li>Normal XMPP Port</li>
  178. <li>Dedicated Binary EXI Port</li>
  179. </ul>
  180. <p>
  181. Both will be described in turn, in the following sections.
  182. </p>
  183. </section1>
  184. <section1 topic='Use Cases' anchor='usecases'>
  185. <!-- TODO: [YD] can we have a summary section to desribe the use case? a short proposal is as follows
  186. The section title of "Detecting support of EXI" is also modified to aligned with overall structure
  187. -->
  188. <section2 topic="Two approaches to use EXI">
  189. <p>
  190. There are two ways to use EXI to make efficient XMPP communication. The first method describes how to activate EXI-compression using &xep0138; (XEP-0138).
  191. The second method describes an alternative binding. This method does not use Stream compression as defined in
  192. <link url="http://xmpp.org/extensions/xep-0138.html">XEP-0138</link>, rather it allows clients to connect
  193. to the server and start using EXI directly from the beginning.
  194. </p>
  195. </section2>
  196. <section2 topic="Stream Compression" anchor="streamcompression">
  197. <p>
  198. The following sections assume the client connects through the normal XMPP port, and starts communicating with the server using uncompressed XML fragments.
  199. When the client connects to the XMPP Server, it will receive a list of features supported by the server:
  200. </p>
  201. <example caption='Search Features'><![CDATA[
  202. <stream:features>
  203. <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
  204. <compression xmlns='http://jabber.org/features/compress'>
  205. <method>zlib</method>
  206. <method>lzw</method>
  207. <method>exi</method>
  208. <method>exi:54321</method>
  209. </compression>
  210. </stream:features>]]></example>
  211. <p>
  212. Support for EXI compression through the normal XMPP port is detected by the existence of the <strong>exi</strong> compression method in the <strong>features</strong> stanza.
  213. If a port (static or dynamic) is available for a dedicated binary EXI/XMPP binding, this can be detected by the existence of the <strong>exi:PORT</strong> compression method,
  214. where PORT is replaced by the port number used. More information about this alternative method is available in the <link url='#alttrans'>Alternative Bindings</link> section.
  215. </p>
  216. <p>
  217. <strong>Note:</strong> If the client already knows the port number of the dedicated binary EXI/XMPP binding, it can connect there directly, without the need to check the
  218. server features using the normal XMPP port.
  219. </p>
  220. <p>
  221. Following is a list of use cases displaying how the client can configure and activate EXI compression on the current binding.
  222. </p>
  223. <section3 topic='Invalid setup'>
  224. <p>
  225. If the client attempts to activate an EXI stream at this point, before the negotiation of EXI properties has been performed, the server must respond with a
  226. <strong>setup-failed</strong> response.
  227. </p>
  228. <example caption='Invalid setup'><![CDATA[
  229. <compress xmlns='http://jabber.org/protocol/compress'>
  230. <method>exi</method>
  231. </compress>
  232. <failure xmlns='http://jabber.org/protocol/compress'>
  233. <setup-failed/>
  234. </failure>]]></example>
  235. </section3>
  236. <section3 topic='Proposing compression parameters' anchor='setup'>
  237. <p>
  238. When the client decides to activate EXI compression, it sends a <strong>setup</strong> stanza containing parameter proposals to the server as follows:
  239. </p>
  240. <example caption='Proposing compression parameters'><![CDATA[
  241. <setup xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true' blockSize='1024'
  242. valueMaxLength='32' valuePartitionCapacity='100'>
  243. <schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/>
  244. <schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/>
  245. <schema ns='jabber:client' bytes='6968' md5Hash='5e2d5cbf0506e3f16336d295093d66c4'/>
  246. <schema ns='jabber:server' bytes='6948' md5Hash='dd95bd3055dfdd69984ed427cd6356e0'/>
  247. <schema ns='jabber:x:roster' bytes='1077' md5Hash='00cb233dee83919067559c5dcee04f3d'/>
  248. <schema ns='urn:ietf:params:xml:ns:xmpp-sasl' bytes='2769' md5Hash='fd9a83f5c75628486ce18c0eb3a35995'/>
  249. <schema ns='urn:ietf:params:xml:ns:xmpp-streams' bytes='3315' md5Hash='75cd95aecb9f1fd66110c3ddcf00c9b8'/>
  250. <schema ns='urn:ietf:params:xml:ns:xmpp-tls' bytes='688' md5Hash='dc18bc4da35bc1be7a6c52aa43330825'/>
  251. <schema ns='urn:ietf:params:xml:ns:xmpp-stanzas' bytes='3133' md5Hash='1a8d21588424f9134dc497de64b10c3f'/>
  252. <schema ns='http://jabber.org/protocol/compress/exi' bytes='15094' md5Hash='8b8f91b95d9101f0781e0ba9b4e106be'/>
  253. <schema ns='urn:xmpp:iot:control' bytes='6293' md5Hash='74dcea52300e8c8df8c4de2c9e90495b'/>
  254. <schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/>
  255. <schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/>
  256. <schema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/>
  257. </setup>]]></example>
  258. <p>
  259. <strong>Note:</strong> Schema files are identified using three properties: Its <strong>target namespace</strong>, its <strong>byte size</strong> and its
  260. <strong>MD5 hash</strong>. The <strong>MD5 hash</strong> provides a way to detect small changes in the file, even if the byte size and namespace are the same.
  261. </p>
  262. <p>
  263. It is important that the client specify not only application specific namespaces in this request, but also the versions of the schemas for the
  264. core XMPP protocol namespaces and the schema for the XML namespace, containing XML attributes.
  265. </p>
  266. <p>
  267. <strong>Note:</strong> Hash values and byte sizes of known schemas at the time of writing, can be found <link url='#knownhashes'>here</link>.
  268. However, these values are informational only. It is recommended that the developer makes sure exactly what version of the schema to use, and
  269. calculate the hash for it correspondingly. Also, some changes to some schemas might be necessary, which will affect the hash values. For more
  270. information about this, see the inforamtion about <link url='#knownproblems'>known problems</link>.
  271. </p>
  272. <p>
  273. After receiving the request, the server responds with a <strong>setupResponse</strong> stanza containing the parameters it can accept, based
  274. on the initial values provided by the client. Any buffer sizes, etc., may have been changed, but only lowered, never raised.
  275. </p>
  276. <example caption='Unable to accommodate parameters'><![CDATA[
  277. <setupResponse xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true'
  278. blockSize='1024' valueMaxLength='32' valuePartitionCapacity='100'>
  279. <schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/>
  280. <schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/>
  281. <schema ns='jabber:client' bytes='6968' md5Hash='5e2d5cbf0506e3f16336d295093d66c4'/>
  282. <schema ns='jabber:server' bytes='6948' md5Hash='dd95bd3055dfdd69984ed427cd6356e0'/>
  283. <schema ns='jabber:x:roster' bytes='1077' md5Hash='00cb233dee83919067559c5dcee04f3d'/>
  284. <schema ns='urn:ietf:params:xml:ns:xmpp-sasl' bytes='2769' md5Hash='fd9a83f5c75628486ce18c0eb3a35995'/>
  285. <schema ns='urn:ietf:params:xml:ns:xmpp-streams' bytes='3315' md5Hash='75cd95aecb9f1fd66110c3ddcf00c9b8'/>
  286. <schema ns='urn:ietf:params:xml:ns:xmpp-tls' bytes='688' md5Hash='dc18bc4da35bc1be7a6c52aa43330825'/>
  287. <schema ns='urn:ietf:params:xml:ns:xmpp-stanzas' bytes='3133' md5Hash='1a8d21588424f9134dc497de64b10c3f'/>
  288. <schema ns='http://jabber.org/protocol/compress/exi' bytes='15094' md5Hash='8b8f91b95d9101f0781e0ba9b4e106be'/>
  289. <schema ns='urn:xmpp:iot:control' bytes='6293' md5Hash='74dcea52300e8c8df8c4de2c9e90495b'/>
  290. <schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/>
  291. <schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/>
  292. <missingSchema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/>
  293. </setupResponse>]]></example>
  294. <p>
  295. Schema files that the server does not have (based on namespace, byte size and MD5 hash) are marked with the <strong>missingSchema</strong> element instead of the
  296. normal <strong>schema</strong> element.
  297. </p>
  298. <p>
  299. At this point the client can choose to abort the EXI enablement sequence if it cannot accommodate itself with the proposed parameter settings provided by the server.
  300. The XMPP session will continue to work in its current state. Aborting does not require taking further action from the client.
  301. </p>
  302. </section3>
  303. <section3 topic='Uploading new schema files'>
  304. <p>
  305. If the server lacks information about a schema file, it is specified in the response through the <strong>missingSchema</strong> elements. At this point, the client can
  306. either choose to accept that these schema files are not available, making compression less efficient, or choose to upload the missing schema files to the server. Of course,
  307. uploading schema files would require the device to have sufficient buffers and memory to store and upload the schema files in the first place. (If it is not possible to upload the
  308. schema files, consideration should be given to installing the schema files manually at the server.)
  309. </p>
  310. <p>
  311. To upload a schema file, the client simply sends the schema file using an <strong>uploadSchema</strong> element, as follows:
  312. </p>
  313. <example caption='Uploading schema file'><![CDATA[
  314. <uploadSchema xmlns='http://jabber.org/protocol/compress/exi' contentType='Text'>
  315. PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjx4czpzY2hlbWENCiAgICB4
  316. bWxuczp4cz0naHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEnDQogICAgdGFyZ2V0TmFt
  317. ZXNwYWNlPSd1cm46eG1wcDpzbjpwcm92aXNpb25pbmcnDQogICAgeG1sbnM9J3Vybjp4bXBwOnNu
  318. dmlsZWdlJz4NCgkJPHhzOmF0dHJpYnV0ZSBuYW1lPSdpZCcgdHlwZT0nUHJpdmlsZWdlSWQnIHVz
  319. ZT0ncmVxdWlyZWQnLz4NCgk8L3hzOmNvbXBsZXhUeXBlPg0KIA0KPC94czpzY2hlbWE+DQo=
  320. </uploadSchema>]]></example>
  321. <p>
  322. The schema itself is sent using base64 encoding to the server. This is to make sure a binary exact copy is transferred, maintaining encoding, processing instructions, etc. The
  323. server then computes the <strong>target namespace</strong>, <strong>byte size</strong> and <strong>MD5 Hash</strong> from the sent schema file.
  324. </p>
  325. <p>
  326. If the client desires, it can test the EXI setup again. This is optional, but can be used to test that uploading the schema files, and any new property values
  327. are accepted by the server.
  328. </p>
  329. <example caption='Testing newly uploaded schema files'><![CDATA[
  330. <setup xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true' blockSize='1024'
  331. valueMaxLength='32' valuePartitionCapacity='100'>
  332. <schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/>
  333. <schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/>
  334. <schema ns='jabber:client' bytes='6968' md5Hash='5e2d5cbf0506e3f16336d295093d66c4'/>
  335. <schema ns='jabber:server' bytes='6948' md5Hash='dd95bd3055dfdd69984ed427cd6356e0'/>
  336. <schema ns='jabber:x:roster' bytes='1077' md5Hash='00cb233dee83919067559c5dcee04f3d'/>
  337. <schema ns='urn:ietf:params:xml:ns:xmpp-sasl' bytes='2769' md5Hash='fd9a83f5c75628486ce18c0eb3a35995'/>
  338. <schema ns='urn:ietf:params:xml:ns:xmpp-streams' bytes='3315' md5Hash='75cd95aecb9f1fd66110c3ddcf00c9b8'/>
  339. <schema ns='urn:ietf:params:xml:ns:xmpp-tls' bytes='688' md5Hash='dc18bc4da35bc1be7a6c52aa43330825'/>
  340. <schema ns='urn:ietf:params:xml:ns:xmpp-stanzas' bytes='3133' md5Hash='1a8d21588424f9134dc497de64b10c3f'/>
  341. <schema ns='http://jabber.org/protocol/compress/exi' bytes='15094' md5Hash='8b8f91b95d9101f0781e0ba9b4e106be'/>
  342. <schema ns='urn:xmpp:iot:control' bytes='6293' md5Hash='74dcea52300e8c8df8c4de2c9e90495b'/>
  343. <schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/>
  344. <schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/>
  345. <schema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/>
  346. </setup>]]></example>
  347. <p>
  348. And the server should then respond:
  349. </p>
  350. <example caption='Agreement between client and server'><![CDATA[
  351. <setupResponse xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true'
  352. blockSize='1024' valueMaxLength='32' valuePartitionCapacity='100' agreement='true'
  353. configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'>
  354. <schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/>
  355. <schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/>
  356. <schema ns='jabber:client' bytes='6968' md5Hash='5e2d5cbf0506e3f16336d295093d66c4'/>
  357. <schema ns='jabber:server' bytes='6948' md5Hash='dd95bd3055dfdd69984ed427cd6356e0'/>
  358. <schema ns='jabber:x:roster' bytes='1077' md5Hash='00cb233dee83919067559c5dcee04f3d'/>
  359. <schema ns='urn:ietf:params:xml:ns:xmpp-sasl' bytes='2769' md5Hash='fd9a83f5c75628486ce18c0eb3a35995'/>
  360. <schema ns='urn:ietf:params:xml:ns:xmpp-streams' bytes='3315' md5Hash='75cd95aecb9f1fd66110c3ddcf00c9b8'/>
  361. <schema ns='urn:ietf:params:xml:ns:xmpp-tls' bytes='688' md5Hash='dc18bc4da35bc1be7a6c52aa43330825'/>
  362. <schema ns='urn:ietf:params:xml:ns:xmpp-stanzas' bytes='3133' md5Hash='1a8d21588424f9134dc497de64b10c3f'/>
  363. <schema ns='http://jabber.org/protocol/compress/exi' bytes='15094' md5Hash='8b8f91b95d9101f0781e0ba9b4e106be'/>
  364. <schema ns='urn:xmpp:iot:control' bytes='6293' md5Hash='74dcea52300e8c8df8c4de2c9e90495b'/>
  365. <schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/>
  366. <schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/>
  367. <missingSchema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/>
  368. </setupResponse>]]></example>
  369. <p>
  370. Note the <strong>agreement</strong> attribute in the response this time. The server must set this attribute to true if it agrees with the proposal from the client.
  371. The client in turn can check this attribute as a quick way to check if agreement exists. When the server is in agreement it must also return a Configuration ID
  372. in the <strong>configurationId</strong> attribute. This Configuration ID can be used later to quicker enter into EXI compressed mode.
  373. </p>
  374. </section3>
  375. <section3 topic='Uploading compressed schema files'>
  376. <p>
  377. The <strong>uploadSchema</strong> command has an optional attribute called <strong>contentType</strong> that can be used to send different types of documents
  378. to the server. This is not a MIME content type, but an enumeration with the following options:
  379. </p>
  380. <table caption='contentType values'>
  381. <tr>
  382. <th>Value</th>
  383. <th>Description</th>
  384. </tr>
  385. <tr>
  386. <td>Text</td>
  387. <td>
  388. The schema is sent as plain text, albeit base-64 encoded. If no encoding is provided in the XML header of the schema file,
  389. UTF-8 encoding is assumed. This is the default value.
  390. </td>
  391. </tr>
  392. <tr>
  393. <td>ExiBody</td>
  394. <td>The schema file is sent as an EXI compressed file, but only the body is sent. *</td>
  395. </tr>
  396. <tr>
  397. <td>ExiDocument</td>
  398. <td>The schema file is sent as an EXI compressed file. The entire file, including Exi header is provided. *</td>
  399. </tr>
  400. </table>
  401. <p>
  402. (*) These options assume the following set of default EXI options are used. It is assumed the XMPP server has more capabilities than the client, so the following
  403. set of options must be supported by the XMPP server. The schema files can be precompressed and stored as binary files on the client for easier transmission.
  404. </p>
  405. <table caption='Default EXI options'>
  406. <tr>
  407. <th>Option</th>
  408. <th>Default value</th>
  409. </tr>
  410. <tr>
  411. <td>Version</td>
  412. <td>1</td>
  413. </tr>
  414. <tr>
  415. <td>alignment</td>
  416. <td>bit-packed</td>
  417. </tr>
  418. <tr>
  419. <td>compression</td>
  420. <td>false</td>
  421. </tr>
  422. <tr>
  423. <td>strict</td>
  424. <td>false</td>
  425. </tr>
  426. <tr>
  427. <td>fragment</td>
  428. <td>false</td>
  429. </tr>
  430. <tr>
  431. <td>preserve</td>
  432. <td>all false, except preserve prefixes that must be true or schema negotation may fail.</td>
  433. </tr>
  434. <tr>
  435. <td>selfContained</td>
  436. <td>false</td>
  437. </tr>
  438. <tr>
  439. <td>schemaId</td>
  440. <td>
  441. The Schema of schemas: http://www.w3.org/2001/XMLSchema.xsd.
  442. </td>
  443. </tr>
  444. <tr>
  445. <td>datatypeRepresentationMap</td>
  446. <td>No map</td>
  447. </tr>
  448. <tr>
  449. <td>blockSize</td>
  450. <td>N/A</td>
  451. </tr>
  452. <tr>
  453. <td>valueMaxLength</td>
  454. <td>unbounded</td>
  455. </tr>
  456. <tr>
  457. <td>valuePartitionCapacity</td>
  458. <td>unbounded</td>
  459. </tr>
  460. </table>
  461. <p>
  462. Since EXI compression does not perserve the extact binary representation of the schema file (for instance it doesn't preserve white space), the server
  463. cannot correctly compute byte size and an MD5 hash for the file. Therefore, the client needs to provide this information in the <strong>uploadSchema</strong>
  464. command using the <strong>bytes</strong> and <strong>md5Hash</strong> attributes. They are mandatory in case EXI compressed schema files are uploaded to the
  465. server. Also note that the byte length and MD5 Hash should be computed on the original XML Schema file, not the compressed or decompressed version.
  466. </p>
  467. </section3>
  468. <section3 topic='Downloading new schema files on server'>
  469. <p>
  470. As an alternative to uploading a schema file to the server, the client can ask the server to download a schema file by itself. This is done using the <strong>downloadSchema</strong>
  471. command, as follows:
  472. </p>
  473. <example caption='Downloading a new XML schema file on server'><![CDATA[
  474. <downloadSchema xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd'/>
  475. ]]></example>
  476. <p>
  477. The server tries to download the schema by itself, and then computes the <strong>target namespace</strong>, <strong>byte size</strong> and <strong>MD5 Hash</strong>
  478. from the downloaded schema.
  479. </p>
  480. <p>
  481. When the schema has been downloaded, the following successful download response is returned:
  482. </p>
  483. <example caption='Schema successfully downloaded'><![CDATA[
  484. <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='true'/>
  485. ]]></example>
  486. <p>
  487. If an HTTP error occurred while trying to download the schema, a response as follows is returned:
  488. </p>
  489. <example caption='HTTP Error'><![CDATA[
  490. <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
  491. <httpError code='404' message='NotFound'/>
  492. </downloadSchemaResponse>]]></example>
  493. <p>
  494. If the URL could not be resolved, the following response is returned:
  495. </p>
  496. <example caption='Invalid URL'><![CDATA[
  497. <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='urk://example.org/schema.xsd' result='false'>
  498. <invalidUrl message='Unrecognized schema.'/>
  499. </downloadSchemaResponse>]]></example>
  500. <p>
  501. If a timeout occurred during the download attempt, the following response is returned:
  502. </p>
  503. <example caption='Timeout'><![CDATA[
  504. <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
  505. <timeout message='No response returned.'/>
  506. </downloadSchemaResponse>]]></example>
  507. <p>
  508. If the url points to something that is not a schema, the following response is returned:
  509. </p>
  510. <example caption='Invalid Content Type'><![CDATA[
  511. <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
  512. <invalidContentType contentTypeReturned='text/html'/>
  513. </downloadSchemaResponse>]]></example>
  514. <p>
  515. If an error occurs that is unforeseen by this specification, the server can simply respond with a generic error message, as follows:
  516. </p>
  517. <example caption='Other types of errors'><![CDATA[
  518. <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
  519. <error message='No free space left.'/>
  520. </downloadSchemaResponse>]]></example>
  521. <p>
  522. <strong>Note:</strong> Downloading a schema, might download a version which does not correspond to the desired version
  523. of the schema. It might for instance have been updated. This means the <strong>bytes</strong> and <strong>md5Hash</strong> values
  524. corresponding to the downloaded file will not match the values expected by the client. Therefore, it's in this case important the client
  525. checks that the server actually downloaded the version of the schema required by the client so it doesn't assume the server uses
  526. the same version of the schema when in actuality it doesn't.
  527. </p>
  528. </section3>
  529. <section3 topic='Accessing quick configurations'>
  530. <p>
  531. Once an EXI setup has been accepted by the server, and agreement is reched, the server will provide the client with a quick Configuration ID
  532. through the <strong>configurationId</strong> attribute. This Configuration ID can be used by the client during successive connections to the server,
  533. to skip the larger part of the handshake, as is shown in the following example:
  534. </p>
  535. <example caption='Accessing quick configurations'><![CDATA[
  536. <setup xmlns='http://jabber.org/protocol/compress/exi' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>
  537. ]]></example>
  538. <p>
  539. <strong>Note:</strong> the quick configuration includes all accepted schemas and all EXI options agreed upon during the
  540. session when the configuration ID was returned. The <strong>configurationId</strong> attribute MUST NOT be used together
  541. with other option attributes or schema definitions in the setup request.
  542. </p>
  543. <p>
  544. If the configuration is still available on the server, the server responds:
  545. </p>
  546. <example caption='Quick configuration accepted'><![CDATA[
  547. <setupResponse xmlns='http://jabber.org/protocol/compress/exi' agreement='true' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>
  548. ]]></example>
  549. <p>
  550. Note that schemas or options are not mentioned explicitly when using this quick setup approach.
  551. </p>
  552. </section3>
  553. <section3 topic='Quick configuration failure'>
  554. <p>
  555. If the server for some reason does not remember the specific configuration requested by the client (the client might have been disconnected for
  556. a long time), it responds in the following manner:
  557. </p>
  558. <example caption='Quick configuration failure'><![CDATA[
  559. <setupResponse xmlns='http://jabber.org/protocol/compress/exi' agreement='false' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>
  560. ]]></example>
  561. <p>
  562. The agreement attribute is optional, with a default value of false. So, if the attribute is omitted, the client must consider the
  563. agreement to be nonexistent. When no agreement is reached using the quick configuration approach, the client must restart the handshake
  564. and <link url='#setup'>propose new compression parameters</link>.
  565. </p>
  566. </section3>
  567. <section3 topic='Start compression'>
  568. <p>
  569. When EXI option negotiation has been completed, the client can tell the server that it is ready to start compression. It does this using the normal <strong>compress</strong>
  570. stanza, as follows:
  571. </p>
  572. <example><![CDATA[
  573. <compress xmlns='http://jabber.org/protocol/compress'>
  574. <method>exi</method>
  575. </compress>]]></example>
  576. <p>
  577. The server now has the necessary knowledge on how the EXI engine should be configured for the current session and it responds as follows:
  578. </p>
  579. <example caption='Compression accepted'><![CDATA[
  580. <compressed xmlns='http://jabber.org/protocol/compress'/>
  581. ]]></example>
  582. <p>
  583. When the client receives acknowledgement that the compression method has been accepted, it restarts the stream, as explained in
  584. <link url='http://xmpp.org/extensions/xep-0138.html#usecase'>XEP 0138</link>, except that it <strong>must not</strong> resend the <strong>&lt;stream&gt;</strong>
  585. start element sequence. Similarly, the client must not send a <strong>&lt;/stream&gt;</strong> element when closing the session.
  586. Instead, special <link url='#streamStart'>streamStart</link> and <link url='#streamEnd'>streamEnd</link> elements are sent. More information
  587. about that later.
  588. </p>
  589. </section3>
  590. </section2>
  591. <section2 topic="EXI-specific stream elements">
  592. <p>
  593. Becuase EXI engines need to close all open XML elements before decompressing, it cannot start the stream by sending only an open &lt;stream&gt; element,
  594. and close the stream by sending a closing &lt;/stream&gt; element. Instead separate <strong>streamStart</strong> and <strong>streamEnd</strong> elements
  595. have to be sent, allowing for similar semantics on the EXI-compressed channel, as described in the following subsections.
  596. </p>
  597. <p>
  598. For clarity, examples in this section are displayed in XML for readability. But it is understood that the elements are sent using EXI compression and
  599. using the options defined during setup.
  600. </p>
  601. <section3 topic="streamStart" anchor="startStream">
  602. <p>
  603. The first thing the client needs to do, once it opens the new EXI-compressed connection, whether it be through the normal XMPP connection or through
  604. the alternative EXI-only binding, is to send a <strong>streamStart</strong> element. This element replaces the start stream tag normally sent.
  605. </p>
  606. <example caption='Start of EXI-compressed stream'>
  607. <![CDATA[
  608. <exi:streamStart from='client@im.example.org'
  609. to='im.example.org'
  610. version='1.0'
  611. xml:lang='en'
  612. xmlns:exi='http://jabber.org/protocol/compress/exi'>
  613. <exi:xmlns prefix='' namespace='jabber:client'/>
  614. <exi:xmlns prefix='streams' namespace='http://etherx.jabber.org/streams'/>
  615. <exi:xmlns prefix='exi' namespace='http://jabber.org/protocol/compress/exi'/>
  616. </exi:streamStart>]]>
  617. </example>
  618. <p>
  619. There's a semantic difference between only writing an open XML element, and sending a closed XML element separately, and that is in the definition
  620. of XML namespaces. XML namespaces and their corresponding prefixes defined in the normal &lt;streams:stream&gt; element will be available to all
  621. child elements following in a normal XMPP stream. However, to be able to do the same in an EXP-compressed XMPP stream, you need to define the
  622. namespaces and prefixes separately. Furthermore, the EXI/XMPP layer needs to make these namespace and prefix-definitions available to all following
  623. elements sent on the stream. The empty prefix is synonymous with the default namespace to use.
  624. </p>
  625. </section3>
  626. <section3 topic="streamEnd" anchor="streamEnd">
  627. <p>
  628. Before closing the connection, the client needs to send a <strong>streamEnd</strong> element. This element replaces the closing stream tag send normally.
  629. </p>
  630. <example caption='End of EXI-compressed stream'>
  631. <![CDATA[
  632. <exi:streamEnd xmlns:exi='http://jabber.org/protocol/compress/exi'/>]]>
  633. </example>
  634. </section3>
  635. </section2>
  636. <section2 topic='Alternative Transport Binding for EXI/XMPP over TCP' anchor='alttrans'>
  637. <!-- [YD] merged from yd's proposal 2013-04-16 -->
  638. <!-- TODO: [PW] Revise use of MUST, SHOULD, COULD, etc. It seems SHOULD and SHOULD NOT is used when MUST/MUST NOT should be used. RECOMMENDED should be SHOULD. -->
  639. <p>
  640. Alternative binding for EXI/XMPP is suitable for use cases such as factory automation, smart grid appliances, and other
  641. embedded use of communications. It works best if clients are constrained and does not update its specification frequently.
  642. In addition, the network should allow clients and servers to use not well-known port because this commeunication involves
  643. alternative TCP port.
  644. </p>
  645. <p>
  646. Typical steps of communication is as follows (based on &rfc6120;).
  647. </p>
  648. <!-- TODO: [PW] Perhaps a bit more descriptive with references and links for more info? It is an XMPP specification, but one cannot assume readers are familiar with details of DHCP, etc. -->
  649. <!-- TODO: [PW] A flow chart would be great. I can embed it inline. -->
  650. <!-- TODO: [PW] Links & notes with references to RFC's. -->
  651. <ol>
  652. <li>
  653. <p>
  654. (Optional)
  655. A client (foo@example.net) try to resolve a server with alternative binding for EXI/XMPP with DNS SRV lookup (ex. _xmpp-bclient._tcp.example.net. IN SRV)
  656. </p>
  657. </li>
  658. <li>
  659. <p>
  660. (Optional)
  661. A DNS server tells a set of DNS RR to notify a server accepts EXI/XMPP binding (ex. SRV 10 10 15222 srv.example.net.) (Optional: the DNS server may tell the version of the default schema supported by the server. Currently there is only one version and has no effect. For further discussion, see <link url="http://tools.ietf.org/html/draft-doi-exi-messaging-requirements-01">draft-doi-exi-messaging-requirement</link>.
  662. </p>
  663. </li>
  664. <li>
  665. <p>The client connects to srv.example.net. 15222 with TCP and the server accepts the connection.</p>
  666. </li>
  667. <li>
  668. <p>
  669. The client sends out 'EXI Cookie' (e.g. '$EXI') and starts EXI stream with an EXI Header without any option document (implies <link url="#defaultParam">default encoding parameters</link>). It sends out EXI events corresponds to start tag of &lt;stream:stream>. Following shows XML Equivalent and EXI events <!-- TBD: shall be fixed after schema fix. -->
  670. </p>
  671. <example caption="XML equivalent of stream start element (Client to Server)">
  672. <!-- samples/C2S/001-start.xml -->
  673. <![CDATA[
  674. <?xml version="1.0"?>
  675. <exi:streamStart xmlns:exi='http://jabber.org/protocol/compress/exi' version="1.0" to="jabber.example.org" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace" >
  676. <exi:xmlns prefix="stream" namespace="http://etherx.jabber.org/streams" />
  677. <exi:xmlns prefix="" namespace="jabber:client" />
  678. <exi:xmlns prefix="xml" namespace="http://www.w3.org/XML/1998/namespace" />
  679. </exi:streamStart>
  680. ]]>
  681. </example>
  682. <example caption="Actual EXI Stream with EXI Header">
  683. <!-- samples/exi-C2S-normal/base/001-base-start-N-SIs.dump -->
  684. <![CDATA[
  685. 0000000 8a 40 8c ad c0 28 d4 c2 c4 c4 ca e4 5c ca f0 c2
  686. 0000020 da e0 d8 ca 5c de e4 ce 00 20 04 89 a1 d1 d1 c0
  687. 0000040 e8 bc bd 95 d1 a1 95 c9 e0 b9 a9 85 89 89 95 c8
  688. 0000060 b9 bd c9 9c bd cd d1 c9 95 85 b5 cc 21 cd d1 c9
  689. 0000100 95 85 b4 07 b5 30 b1 31 32 b9 1d 31 b6 34 b2 b7
  690. 0000120 3a 01 02 66 87 47 47 03 a2 f2 f7 77 77 72 e7 73
  691. 0000140 32 e6 f7 26 72 f5 84 d4 c2 f3 13 93 93 82 f6 e6
  692. 0000160 16 d6 57 37 06 16 36 50 57 86 d6 ca
  693. 0000174
  694. ]]>
  695. </example>
  696. </li>
  697. <li>
  698. <p>The server responds with EXI stream, with EXI cookie, without EXI option, and with appropriate events for stream tag.</p>
  699. <example caption="XML equivalent of stream start element (Server to Client)">
  700. <!-- samples/S2C/001-base-start.xml -->
  701. <![CDATA[
  702. <?xml version="1.0"?>
  703. <exi:streamStart xmlns:exi='http://jabber.org/protocol/compress/exi' version="1.0" from="jabber.example.org" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace" >
  704. <exi:xmlns prefix="stream" namespace="http://etherx.jabber.org/streams" />
  705. <exi:xmlns prefix="" namespace="jabber:client" />
  706. <exi:xmlns prefix="xml" namespace="http://www.w3.org/XML/1998/namespace" />
  707. </exi:streamStart>
  708. ]]>
  709. </example>
  710. <example caption="Actual EXI Stream with EXI Header">
  711. <!-- samples/exi-S2C-normal/base/001-base-start-N-SIs.dump -->
  712. <![CDATA[
  713. 0000000 8a 02 8d 4c 2c 4c 4c ae 45 cc af 0c 2d ae 0d 8c
  714. 0000020 a5 cd ee 4c e2 08 ca dc 20 10 02 44 d0 e8 e8 e0
  715. 0000040 74 5e 5e ca e8 d0 ca e4 f0 5c d4 c2 c4 c4 ca e4
  716. 0000060 5c de e4 ce 5e e6 e8 e4 ca c2 da e6 10 e6 e8 e4
  717. 0000100 ca c2 da 03 da 98 58 98 99 5c 8e 98 db 1a 59 5b
  718. 0000120 9d 00 81 33 43 a3 a3 81 d1 79 7b bb bb b9 73 b9
  719. 0000140 99 73 7b 93 39 7a c2 6a 61 79 89 c9 c9 c1 7b 73
  720. 0000160 0b 6b 2b 9b 83 0b 1b 28 2b c3 6b 65
  721. 0000174
  722. ]]>
  723. </example>
  724. </li>
  725. <li>
  726. <p>
  727. If client needs TLS or SASL negotiation, it should be done at this step. As specified in <link url="http://xmpp.org/rfcs/rfc6120.html#streams-negotiation-restart">Section 4.3.3 of RFC6120</link>, both parties MUST not send events corresponds to &lt;/stream:stream> tag. (e.g. exi:streamEnd element)
  728. </p>
  729. </li>
  730. <li>
  731. <p>
  732. If client needs to use different encoding option or schema than the default encoding options or <link url="#defaultSchema">the default schema</link>, then the client shall start <link url="#schemaHandling">schema negotiation</link>. The streams with alternate options/schemas SHOULD NOT have an EXI Options document to indicate the parameter is negotiated via previous XMPP stream.
  733. </p>
  734. <p>
  735. For example, the client want to use MUC option (<link url="http://xmpp.org/extensions/xep-0045.html">XEP-0045</link>), the following communication will occur. First, client try to renegotiate XML schema used in the communication.
  736. </p>
  737. <example caption="XML equivalent of setup element (Client to Server)">
  738. <!-- samples/C2S/002-base-setup.xml -->
  739. <![CDATA[
  740. <?xml version="1.0"?>
  741. <exi:setup xmlns:exi='http://jabber.org/protocol/compress/exi'>
  742. <exi:schema ns="http://jabber.org/protocol/muc" bytes="1322" md5Hash="853ad555f102bb2b71da9a2f2787f4f9" />
  743. <exi:schema ns="http://jabber.org/protocol/muc#owner" bytes="1284" md5Hash="6e4e2257c1a4ba937fbdf71664a7e793" />
  744. </exi:setup>
  745. ]]>
  746. </example>
  747. <example caption="Actual EXI Stream">
  748. <!-- samples/exi-C2S-normal/base/002-base-setup-N-SIs.dump -->
  749. <![CDATA[
  750. 0000000 7b 0a a0 a2 24 14 6a 69 4a 57 84 02 5a c4 b3 85
  751. 0000020 aa 4a 84 f1 1d 07 79 1e 92 06 87 47 47 03 a2 f2
  752. 0000040 f6 a6 16 26 26 57 22 e6 f7 26 72 f7 07 26 f7 46
  753. 0000060 f6 36 f6 c2 f6 d7 56 32 10 28 88 ce 23 84 22 9d
  754. 0000100 81 51 16 a4 8c ef 5b 5e 70 98 c4 51 dc 74 8c 99
  755. 0000120 a1 d1 d1 c0 e8 bc bd a9 85 89 89 95 c8 b9 bd c9
  756. 0000140 9c bd c1 c9 bd d1 bd 8d bd b0 bd b5 d5 8c 8d bd
  757. 0000160 dd b9 95 ca
  758. 0000164
  759. ]]>
  760. </example>
  761. </li>
  762. <li>
  763. <p>
  764. In the response the server accepts schema change.
  765. </p>
  766. <example caption="XML equivalent of setup element (Server to Client)">
  767. <!-- samples/S2C/002-base-sestupResponse.xml -->
  768. <![CDATA[
  769. <?xml version="1.0"?>
  770. <exi:setupResponse xmlns:exi='http://jabber.org/protocol/compress/exi' agreement="true" configurationId="a83b19b31e016409d3001331d9f084fc">
  771. <exi:schema ns="http://jabber.org/protocol/muc" bytes="1322" md5Hash="853ad555f102bb2b71da9a2f2787f4f9" />
  772. <exi:schema ns="http://jabber.org/protocol/muc#owner" bytes="1284" md5Hash="6e4e2257c1a4ba937fbdf71664a7e793" />
  773. </exi:setupResponse>
  774. ]]>
  775. </example>
  776. <example caption="Actual EXI Stream">
  777. <!-- samples/exi-S2C-normal/base/002-base-setupResponse-N-SIs.dump -->
  778. <![CDATA[
  779. 0000000 7c 08 c9 8d cd 8c 58 58 58 98 cc 0b 58 4c 8d 4d
  780. 0000020 4b 4d 18 8e 58 8b 4e 0e 58 4c 4b 4d 18 d8 8e 0d
  781. 0000040 4e 4d 4d 4e 4d 8e 4c 72 a8 28 89 05 1a 9a 52 95
  782. 0000060 e1 00 96 b1 2c e1 6a 92 a1 3c 47 41 de 47 a4 81
  783. 0000100 a1 d1 d1 c0 e8 bc bd a9 85 89 89 95 c8 b9 bd c9
  784. 0000120 9c bd c1 c9 bd d1 bd 8d bd b0 bd b5 d5 8c 84 0a
  785. 0000140 22 33 88 e1 08 a7 60 54 45 a9 23 3b d6 d7 9c 26
  786. 0000160 31 14 77 1d 23 26 68 74 74 70 3a 2f 2f 6a 61 62
  787. 0000200 62 65 72 2e 6f 72 67 2f 70 72 6f 74 6f 63 6f 6c
  788. 0000220 2f 6d 75 63 23 6f 77 6e 65 72 c0
  789. 0000233
  790. ]]>
  791. </example>
  792. <p>
  793. Note that the server may deny the negotiation with agreement="false" setupResponse (example omitted).
  794. </p>
  795. </li>
  796. <li>
  797. <p>Just after receiving the setupResponse, client re-opens the stream. The new stream should have EXI header and may have EXI option header with updated options.</p>
  798. <example caption="XML equivalent of stream start element (Client to Server)">
  799. <!-- samples/C2S/010-base+muc-restart.xml -->
  800. <![CDATA[
  801. <?xml version="1.0"?>
  802. <exi:streamStart xmlns:exi='http://jabber.org/protocol/compress/exi' version="1.0" to="jabber.example.org" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace">
  803. <exi:xmlns prefix="stream" namespace="http://etherx.jabber.org/streams" />
  804. <exi:xmlns prefix="" namespace="jabber:client" />
  805. <exi:xmlns prefix="xml" namespace="http://www.w3.org/XML/1998/namespace" />
  806. </exi:streamStart>
  807. ]]>
  808. </example>
  809. <example caption="Actual EXI Stream">
  810. <!-- samples/exi-C2S-normal/base+muc/ -->
  811. <![CDATA[
  812. 0000000 98 40 8c ad c0 28 d4 c2 c4 c4 ca e4 5c ca f0 c2
  813. 0000020 da e0 d8 ca 5c de e4 ce 00 20 04 89 a1 d1 d1 c0
  814. 0000040 e8 bc bd 95 d1 a1 95 c9 e0 b9 a9 85 89 89 95 c8
  815. 0000060 b9 bd c9 9c bd cd d1 c9 95 85 b5 cc 21 cd d1 c9
  816. 0000100 95 85 b4 07 b5 30 b1 31 32 b9 1d 31 b6 34 b2 b7
  817. 0000120 3a 01 02 66 87 47 47 03 a2 f2 f7 77 77 72 e7 73
  818. 0000140 32 e6 f7 26 72 f5 84 d4 c2 f3 13 93 93 82 f6 e6
  819. 0000160 16 d6 57 37 06 16 36 50 57 86 d6 ca
  820. 0000174
  821. ]]>
  822. </example>
  823. </li>
  824. <li>
  825. <p>In response, server re-opens the stream with exi:streamStart tag.</p>
  826. <example caption="XML equivalent of stream start element (Server to Client)">
  827. <!-- samples/S2C/010-base+muc-restart.xml -->
  828. <![CDATA[
  829. <?xml version="1.0"?>
  830. <!-- configuration id 761aabc0-a255-4b9b-89a1-4cb859559691 -->
  831. <exi:streamStart xmlns:exi='http://jabber.org/protocol/compress/exi' version="1.0" to="jabber.example.org" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace" >
  832. <exi:xmlns prefix="stream" namespace="http://etherx.jabber.org/streams" />
  833. <exi:xmlns prefix="" namespace="jabber:client" />
  834. <exi:xmlns prefix="xml" namespace="http://www.w3.org/XML/1998/namespace" />
  835. </exi:streamStart>
  836. ]]>
  837. </example>
  838. <example caption="Actual EXI Stream">
  839. <!-- samples/exi-S2C-normal/base+muc/010-base+muc-restart-N-SIs.dump -->
  840. <![CDATA[
  841. 0000000 98 02 8d 4c 2c 4c 4c ae 45 cc af 0c 2d ae 0d 8c
  842. 0000020 a5 cd ee 4c e2 08 ca dc 20 10 02 44 d0 e8 e8 e0
  843. 0000040 74 5e 5e ca e8 d0 ca e4 f0 5c d4 c2 c4 c4 ca e4
  844. 0000060 5c de e4 ce 5e e6 e8 e4 ca c2 da e6 10 e6 e8 e4
  845. 0000100 ca c2 da 03 da 98 58 98 99 5c 8e 98 db 1a 59 5b
  846. 0000120 9d 00 81 33 43 a3 a3 81 d1 79 7b bb bb b9 73 b9
  847. 0000140 99 73 7b 93 39 7a c2 6a 61 79 89 c9 c9 c1 7b 73
  848. 0000160 0b 6b 2b 9b 83 0b 1b 28 2b c3 6b 65
  849. 0000174
  850. ]]>
  851. </example>
  852. </li>
  853. <li>
  854. <p>After an exi:streamStart from the server to the client, they can communicate with EXI stream. The first level element in conventional XMPP is encoded as root element of EXI message. For example, a client may send MUC query with EXI.</p>
  855. <example caption="XML equivalent of MUC chat message (Client to Server)">
  856. <!-- samples/C2S/050-base+muc-muc-iq.xml -->
  857. <![CDATA[
  858. <?xml version="1.0"?>
  859. <iq xmlns="jabber:client" type="set" to="sensors@conference.example.org" id="ab26a" >
  860. <query xmlns="http://jabber.org/protocol/muc#owner">
  861. <x xmlns="jabber:x:data" type="submit" />
  862. </query>
  863. </iq>
  864. ]]>
  865. </example>
  866. <example caption="Actual EXI Stream with EXI Header">
  867. <!-- samples/exi-S2C-normal/base+muc/050-base+muc-00-iq-response-N-SIs.dump -->
  868. <![CDATA[
  869. 0000000 42 20 73 65 6e 73 6f 72 73 40 63 6f 6e 66 65 72
  870. 0000020 65 6e 63 65 2e 65 78 61 6d 70 6c 65 2e 6f 72 67
  871. 0000040 07 61 62 32 36 61 47 d9 5e 1a 50 1a 98 58 98 99
  872. 0000060 5c 8b 99 5e 18 5b 5c 1b 19 4b 9b dc 99 cb dc d9
  873. 0000100 5b 9c db dc a8
  874. 0000105
  875. ]]>
  876. </example>
  877. <p>
  878. This message has a query element under muc#owner namespace. This is performed efficiently because
  879. this series of messages from the last streamStart element has been encoded with the set of schemas and the set inclues schemas for MUC.
  880. Otherwise, the encoding will become 'built-in grammar' even if the encoder and the decoder uses non-strict schema-informed grammar.
  881. This is not possible if either encoder or decoder does not support built-in grammar or the stream uses strict schema-informed grammar.
  882. In such cases, the whole message that contains undefined element or attribute SHOULD be dropped. <!-- [YD] IS THIS OKAY? -->
  883. </p>
  884. </li>
  885. <li>
  886. <p>The client and the server may end the stream with exi:streamEnd tag anytime.</p>
  887. <example caption="XML equivalent of stream end element (Client to Server)" >
  888. <!-- samples/C2S/099-base+muc-end.xml -->
  889. <![CDATA[
  890. <?xml version="1.0"?>
  891. <streamEnd xmlns='http://jabber.org/protocol/compress/exi' />
  892. ]]>
  893. </example>
  894. <example caption="Actual EXI Stream">
  895. <!-- samples/exi-C2S-normal/base+muc/099-base+muc-end-N-SIs.dump -->
  896. <![CDATA[
  897. 0000000 96
  898. 0000001
  899. ]]>
  900. </example>
  901. <p>
  902. Exactly same message should be sent from the server to the client to close the opposite way of the stream (example omitted).
  903. </p>
  904. </li>
  905. <li>
  906. <p>
  907. The client now can start a preconfigured EXI/XMPP stream with explicit EXI option with the encoding option and canoinc schema used in the previous negotiated session (<link url="#shortcutAltBind">shortcut setup</link>)
  908. </p>
  909. <example caption="EXI Option Document used for Shortcut Setup (Client to Server)">
  910. <!-- samples/quick-setup-header.xml -->
  911. <![CDATA[
  912. <?xml version="1.0"?>
  913. <header xmlns="http://www.w3.org/2009/exi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  914. <common>
  915. <schemaId>c:761aabc0-a255-4b9b-89a1-4cb859559691</schemaId>
  916. </common>
  917. </header>
  918. ]]>
  919. </example>
  920. <example caption="XML Equivalent of streamStart">
  921. <!-- samples/C2S/010-base+muc-restart.xml -->
  922. <![CDATA[
  923. <?xml version="1.0"?>
  924. <exi:streamStart xmlns:exi='http://jabber.org/protocol/compress/exi' version="1.0" to="jabber.example.org" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace">
  925. <exi:xmlns prefix="stream" namespace="http://etherx.jabber.org/streams" />
  926. <exi:xmlns prefix="" namespace="jabber:client" />
  927. <exi:xmlns prefix="xml" namespace="http://www.w3.org/XML/1998/namespace" />
  928. </exi:streamStart>
  929. ]]>
  930. </example>
  931. <!--
  932. <example caption="Actual EXI Stream with EXI option document">
  933. FIXME: needs some development
  934. </example>
  935. -->
  936. </li>
  937. <li>
  938. <p>
  939. The server may respond with the given configuration ID. This can skip the configuration setup and the communication can continue with preconfigured schemas.
  940. </p>
  941. <example caption="EXI Option Document used for Shortcut Setup (Server to Client)">
  942. <!-- samples/quick-setup-header.xml -->
  943. <![CDATA[
  944. <?xml version="1.0"?>
  945. <header xmlns="http://www.w3.org/2009/exi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  946. <common>
  947. <schemaId>c:761aabc0-a255-4b9b-89a1-4cb859559691</schemaId>
  948. </common>
  949. </header>
  950. ]]>
  951. </example>
  952. <example caption="XML Equivalent of streamStart in response">
  953. <!-- samples/S2C/010-base+muc-restart.xml -->
  954. <![CDATA[
  955. <?xml version="1.0"?>
  956. <exi:streamStart xmlns:exi='http://jabber.org/protocol/compress/exi' version="1.0" from="jabber.example.org" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace" >
  957. <exi:xmlns prefix="stream" namespace="http://etherx.jabber.org/streams" />
  958. <exi:xmlns prefix="" namespace="jabber:client" />
  959. <exi:xmlns prefix="xml" namespace="http://www.w3.org/XML/1998/namespace" />
  960. </exi:streamStart>
  961. ]]>
  962. </example>
  963. <!--
  964. <example caption="Actual EXI Stream with EXI option document">
  965. FIXME: needs some development
  966. </example>
  967. -->
  968. <p>
  969. Or server may deny to start the new communication by just sending streamEnd tag with default encoding.
  970. </p>
  971. <example caption="XML Equivalent of streamEnd to deny the configuration">
  972. <![CDATA[
  973. <?xml version="1.0"?>
  974. <streamEnd xmlns='http://jabber.org/protocol/compress/exi' />
  975. ]]>
  976. </example>
  977. <!--
  978. <example caption="Actual EXI Stream with EXI option document">
  979. FIXME
  980. </example>
  981. -->
  982. </li>
  983. </ol>
  984. <section3 topic="DNS SRV lookup" anchor="srv">
  985. <p>
  986. Just same with section 3.2.1 of RFC6120. The service name MUST be
  987. 'xmpp-bclient' (for binary client-to-server connections) or
  988. 'xmpp-bserver' (for binary server-to-server connections).
  989. </p>
  990. </section3>
  991. <section3 topic='Fallback Process' anchor='fallback'>
  992. <p>
  993. Fallback to well-known XMPP ports (5222, 5269) without doing SRV
  994. lookup is allowed. In this case, an initiating entity SHOULD give up
  995. connection if it receives non-EXI data (e.g. no EXI cookie and no
  996. distinguishing bit is set) and SHOULD NOT do automatic retry.
  997. </p>
  998. <p>
  999. When an initiating entity tries to communicate with an XMPP server
  1000. with EXI, it SHOULD start the stream with an EXI cookie
  1001. ('$EXI') to avoid ambiguity.
  1002. </p>
  1003. <p>
  1004. Note: this expects an XMPP server shall return some error in plain
  1005. XML if the server receives EXI.
  1006. </p>
  1007. </section3>
  1008. <section3 topic="Default Payload Encoding Options for EXI/XMPP" anchor="defaultParam">
  1009. <!-- [YD]
  1010. TODO: requires discussion for merge
  1011. numerical parameter shall be defined by some more experiments and
  1012. analysis of actual traffics. [YD]
  1013. -->
  1014. <p>
  1015. When no EXI encoding option is given, or not specified by given EXI encoding option while negotiation, followings are the default
  1016. encoding options for EXI/XMPP messages.
  1017. </p>
  1018. <ul>
  1019. <li>alignment: bit-packed</li>
  1020. <li>compression: false</li>
  1021. <li>strict: true</li>
  1022. <li>fragment: false</li>
  1023. <li>preserve: all false</li>
  1024. <li>selfContained: false</li>
  1025. <li>schemaId: "urn:xmpp:exi:default"</li>
  1026. <!-- [YD] FIXME modified. Is this ok? -->
  1027. <li>datatypeReresentationMap: not exist</li>
  1028. <li>blockSize: N/A</li>
  1029. <li>valueMaxLength: 64</li>
  1030. <li>valuePartitionCapacity: 64</li>
  1031. </ul>
  1032. <!-- [YD] agreed 2013-07-12:
  1033. // 4K RAM for value partitions - is this enough small?
  1034. // valueMaxLength should be something like 95% percentile of JID
  1035. // sorted by the length
  1036. -->
  1037. <p>
  1038. In addition, local value learning mechanism is disabled by
  1039. default as described in section 4 of <link url="https://www.w3.org/TR/exi-profile/">EXI Profile</link>.
  1040. <!-- FIXME: [YD] add reference to available implementations -->
  1041. </p>
  1042. <ul>
  1043. <li>localValuePartitions: 0</li>
  1044. <li>maximumNumberOfBuiltInElementGrammars: 0 (means no grammar learning)</li>
  1045. <li>maximumNumberOfBuiltInProductions: 0 (means no production learning)</li>
  1046. </ul>
  1047. <p>
  1048. Corresponding parameter for EXI Profile is as follows:
  1049. </p>
  1050. <code>
  1051. &lt;p xmlns="http://www.w3.org/2009/exi"
  1052. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  1053. xsi:type="xsd:decimal">1.1&lt;/p>
  1054. </code>
  1055. </section3>
  1056. </section2>
  1057. </section1>
  1058. <section1 topic='Implementation Notes' anchor='impl'>
  1059. <section2 topic='EXI Encoding Preprocessing and Postprocessing'>
  1060. <!-- [YD] added to provide 'common view' on implementation. This can be introductionaly and I placed as the first section of implementation notes. Please move this section to somewhere else to improve readability -->
  1061. <p>
  1062. This section describes a common view on programming model between EXI/XMPP servers and clients. This is just an example and an implementation may do it in different ways. However, messages exchanged as a result should be identical.
  1063. </p>
  1064. <p>
  1065. As shown in this document, XMPP documents represented by EXI is slightly different from documents represented in XML.
  1066. For example, each stanzas and first level elements under &lt;stream:stream&gt; tags must be encoded as a standalone EXI
  1067. body (document). If namespace prefixes are declared in the root element of XML process (&lt;stream:stream&gt; tag),
  1068. the prefix should be recovered on decoded XML on the receiver side (EXI may or may not preserve prefix).
  1069. Therefore, some preprocessing and postprocessing is required to make current XMPP implementations work properly over
  1070. EXI/XMPP channel. An example of the configuration is described in the following figure.
  1071. </p>
  1072. <example caption='Example configuration of communication channels.'>
  1073. <![CDATA[
  1074. +-------------------------+ +-----------------------+
  1075. | +----+ | | +----+ |
  1076. | | | <------------------ Plain XMPP Channel ----------------> | | |
  1077. | |XMPP| | | |XMPP| |
  1078. | | | <-[Proc]-[EXI]<------- EXI Channel ------>[EXI]-[Proc]-> | | |
  1079. | +----+ | | +----+ |
  1080. +-------------------------+ +-----------------------+
  1081. ]]>
  1082. </example>
  1083. <p>
  1084. In the example, the box XMPP is conventional XMPP process. [EXI] represents EXI processor (encoder and decoder). [Proc] means preprocessor and postprocessor.
  1085. Following pre-process must be applied to XML streams from XMPP process before giving the stream to EXI processors.
  1086. </p>
  1087. <ol>
  1088. <li>&lt;stream:stream&gt; start tag must be converted to standalone &lt;exi:streamStart&gt; element. All attributes defined in the input XML except namespace declarations should be copied as is. Namespace declarations and prefixes must be converted to exi:xmlns element under exi:streamStart element.</li>
  1089. <li>All first level elements under the root &lt;stream:stream&gt; element must be converted to standalone (root) element of corresponding stanza elements. If there are missing namespace declarations in the element, appropriate prefix declarations should be added to the element before giving the element to the EXI encoder as a document. Contents of the elements should not be modified.</li>
  1090. <li>&lt;/stream:stream&gt; end tag must be converted to standalone &lt;exi:streamEnd&gt; element.</li>
  1091. </ol>
  1092. <p>
  1093. Following post-process must be applied to XML streams from EXI processors before giving the stream to XMPP process.
  1094. </p>
  1095. <ol>
  1096. <li>Received &lt;exi:streamStart&gt; element must be converted to &lt;stream:stream&gt; start tag with appropriate attributes and namespace declarations. Prefixies defined in the &lt;exi:streamStart&gt; content must be saved under the current connection context of postprocessor.</li>
  1097. <li>Received EXI messages must be reproduced as elements under &lt;stream:stream&gt; root element. In addition, the namespace declarations in the element must be replaced to prefixes given in the streamStart tag content if there is a corresponding namespace declaration.</li>
  1098. <li>&lt;exi:streamEnd&gt; element must be converted to &lt;/stream:stream&gt; end tag. The context created under the connection may be released.</li>
  1099. </ol>
  1100. </section2>
  1101. <section2 topic='EXI options'>
  1102. <!-- [YD] FIXME: agreed: change this description as simple list of options and reference to the EXI spec. XMPP-dependent description may be added. -->
  1103. <!-- [YD] FIXME: add some numbers according to examples to show effects (in size) -->
  1104. <!-- DATA URI Scheme can be used to add figures (memo) -->
  1105. <p>
  1106. There are many <link url='http://www.w3.org/TR/exi/#options'>EXI options</link> in EXI Format. Followings are brief description for use in XMPP.
  1107. </p>
  1108. <p>
  1109. The <strong>alignment option</strong> is to control how the values are encoded. The default option 'bit-packed' fits most of communication use cases. If TLS compression is used at the same time, pre-compression will make the best result.
  1110. </p>
  1111. <p>
  1112. The <strong>compression option</strong> is a Boolean to specify additional entropy-based compression is performed over EXI encoding. This option works best for larger documents. Usual use cases expected in XMPP/EXI may not give much additional compactness to messages.
  1113. </p>
  1114. <p>
  1115. The <strong>strict option</strong> is a Boolean to let EXI grammars (schema-informed grammars) work more strictly. With a strict schema-informed grammar, only valid data with the schema is allowed in streams. This makes best compactness of a grammar and messages without additional entropy-based compression. With nonstrict schema-informed grammar, derived elements and attributes could be encoded in the built-in grammar. The built-in grammar is a dynamic, self-learning grammar model that gives full flexibility, with larger message size.
  1116. </p>
  1117. <p>
  1118. The <strong>preserve option</strong> is a set of Booleans to alter some production of events. Usually, all false (no preservation of comments, processing instructions, DTDs, namespace declarations and its prefixes, and lexical values) makes no problem on XMPP communication. However, uploading a binary schema may require the schema encoded with preserved namespace prefixes. The prefixes are used in type definitions, and without prefix preservation binding between type definition references and actual definitions will be lost.
  1119. </p>
  1120. <p>
  1121. The <strong>selfContained option</strong> is a Boolean to enable self contained encoding of elements. Self contained element has no dependency to context (string table state in EXI processors) and can be copied to other context with the same grammar. However, self contained elements cannot use external string tables in EXI processors and may result larger size.
  1122. </p>
  1123. <p>
  1124. The <strong>datatypeRepresentationMap option</strong> can be used to modify how types encoded in EXI. If encoders and decoders have special encoding, it can be specified here. In most use cases in XMPP/EXI, this option will not be used.
  1125. </p>
  1126. <p>
  1127. The <strong>blockSize option</strong> specifies the block size used for EXI compression. It has no effect if compression is not used.
  1128. </p>
  1129. <p>
  1130. The <strong>valueMaxLength option</strong> specifies the maximum length of re-used string in a stream. Larger value makes more strings captured in string tables in EXI processors. This means more memory needs to be allocated to process a stream. Because some use cases, such as Internet of Things, expects constrained nodes in the network, default value specified in ths XEP is very small (64 characters).
  1131. </p>
  1132. <p>
  1133. The <strong>valuePartitionCapacity option</strong> specifies how many strings should be kept in a string table in a time. Default value of this is also small in this XEP (64 strings).
  1134. </p>
  1135. <!-- [YD] This option should not be considered as EXI option. I added a note at the beginning of the paragraph. -->
  1136. <p>
  1137. To control buffer and string table life time, this XEP adds a new option: <strong>sessionWideBuffers</strong>.
  1138. If set to true, all buffers, string tables, etc. will be maintained during the entire session.
  1139. This may improve performance during time since strings can be omitted in the compressed binary stream, but it might also in some cases degrade performance since more options are
  1140. available in the tables, requiring more bits to encode strings. The default value is false, meaning that buffers, string tables, etc., are cleared between each stanza. (This option
  1141. is EXI/XMPP specific.)
  1142. </p>
  1143. <section3 topic='Evaluations of Options'>
  1144. <p>
  1145. This section describes effects in message size for some options.
  1146. </p>
  1147. <p>
  1148. The option <strong>sessionWideBuffers</strong> must have large effect in XMPP communication, because many XIDs are re-used many time within a XMPP stream.
  1149. If sessionWideBuffers option is enabled, most of XIDs can be encoded in short identifiers as it appears in some previous messages. Followings are
  1150. preliminary evaluation of message size of XML (plain old XML), EXI with sessionWideBuffers=false, and EXI with sessionWideBuffers=true.
  1151. </p>
  1152. <ul>
  1153. <li>
  1154. <!-- % for x in C2S/*.xml S2C/*.xml; do xmlindent -i 0 -l 10000 $x|grep -v '^<?xml'|tr -d '\n'; done|wc -c -->
  1155. <strong>Plain Old XML (without XML declaration, whitespaces)</strong>: 5011 bytes in 22 messages
  1156. </li>
  1157. <li>
  1158. <!-- % cat samples/exi-{C2S,S2C}-normal/{base,base+muc}/*.exi|wc -c -->
  1159. <strong>EXI without sessionWideBuffers</strong>: 1614 bytes in 22 messages
  1160. </li>
  1161. <li>
  1162. <!-- % cat samples/exi-{C2S,S2C}-persistent/{base,base+muc}/*.exi|wc -c -->
  1163. <strong>EXI with sessionWideBuffers</strong>: 1458 bytes in 22 messages <!-- [YD] effect is lower than expected...? -->
  1164. </li>
  1165. </ul>
  1166. </section3>
  1167. </section2>
  1168. <section2 topic='Transmission of EXI bodies and Session-wide Buffers'>
  1169. <p>
  1170. The transmission of EXI-compressed stanzas takes the form of a sequence of EXI bodies. In order for the recipient to be able to correctly interpret these incoming
  1171. EXI bodies, the sender is required to flush any pending bits at the end of the last End Document (ED) event for each stanza and then send any pending bytes available
  1172. in the output buffer. Since this makes sure each EXI body starts at an even byte boundary, it permits the recipient to decompress the body into an XML stanza.
  1173. </p>
  1174. <p>
  1175. Therefore, each stanza sent on the stream, must be compressed separately, reusing the same options as used by the stream.
  1176. (Options are not sent on the stream, only the generated EXI bodies).
  1177. </p>
  1178. <p>
  1179. Compression of the stanza must be done in document mode, not fragment mode, including the Start Document (SD) and End Document (ED) events.
  1180. If there are unwritten bits pending after the last End Document (ED) event (after the end of the stanza), Zero-bits are written until a byte boundary is created.
  1181. The receptor must ignore bits in the last byte after the last End Document event has been received.
  1182. </p>
  1183. <p>
  1184. During setup of the EXI compression engine, the client can choose if buffers are to be reused between stanzas, or cleared between each stanza. This is done
  1185. using the EXI over XMPP specific option <strong>sessionWideBuffers</strong>, which is false by default, meaning buffers and string tables are cleared between
  1186. each stanza.
  1187. </p>
  1188. <p>
  1189. There may be cases where maintaining buffers and string tables throughout the session is preferrable. Since strings are already available in the buffers,
  1190. they don't need to be output in the stream the first time they appear in a stanza. However, the number of strings in tables increase, and so does the number of bits required to
  1191. encode them. Depending on what type of communication is performed, this option might give better results one way or another. If the same type of message is always
  1192. sent, maintaining string buffers may be more efficient. But if the client sends many many different types of messages, clearing buffers may be more efficient.
  1193. </p>
  1194. <p>
  1195. Note that the stream of EXI bodies is indefinite. It only stops when the session is closed, i.e. when the socket connection is dropped. Therefore, the buffers can grow
  1196. indefinitely unless control is maintained on what types of messages are sent, their contents (specifically string values), and to whom they are sent (JIDs being strings).
  1197. All string tables and buffers must be cleared when a connection is lost.
  1198. </p>
  1199. <p>
  1200. Note also that if you want the option to enter a session in the middle of the flow to listen to the communication, you need to clear tables and buffers between each
  1201. stanza, or you will not be able to decode the binary stream appropriately.
  1202. </p>
  1203. </section2>
  1204. <section2 topic='Preserving prefixes'>
  1205. <p>
  1206. Normally, prefixes are not preserved during EXI compression and decompression. If the communicating parties (sending client, XMPP server(s) and receiving clients)
  1207. interpret incoming stanzas and content according to namespace, this should be sufficient. However, some implementations do not check namespaces, but prefix names used.
  1208. In such cases, all communicating parties are required to enable the preserve prefixes option during negotionating.
  1209. </p>
  1210. <p>
  1211. <strong>Note:</strong> It is not sufficient that one party enable this option. Both sender and received are required to enable this option, or prefix names will be
  1212. lost in the transmission.
  1213. </p>
  1214. <p>
  1215. Note also, that preserving prefix names result in less efficient compression. Therefore, all clients implementing EXI compression should strive to parse incoming
  1216. XML based on namespace, not prefix name.
  1217. </p>
  1218. </section2>
  1219. <section2 topic='Networks containing clients having limited memory'>
  1220. <p>
  1221. To successfully implement a network with clients having limited memory, such as sensor networks, care should be taken to make sure necessary schema files are
  1222. preinstalled on the server, to avoid the necessity to upload schema files from the clients. Clients with limited memory might be unable to perform this task.
  1223. </p>
  1224. <p>
  1225. An alternative may be to install a richer client, that can upload the schema files to the server dynamically, and installing it into the network. Any client uploading
  1226. a schema file, will make that schema file available for EXI compression to any other client in the network.
  1227. </p>
  1228. </section2>
  1229. <section2 topic='Caching schema files'>
  1230. <p>
  1231. Schema files uploaded to the server should be cached on the server in some kind of schema repository. If memory is limited on the server, schema files should be
  1232. sorted by last access. Schema files with the oldest last access timestamp could be removed to maintain the cache within an approved cache size.
  1233. </p>
  1234. <p>
  1235. Note that schema files have three keys: <strong>Target namespace</strong>, <strong>byte size</strong> and <strong>MD5 Hash</strong>. Multiple versions of a schema file
  1236. may exist (that is, with the same target namespace but different byte sizes or MD5 hash codes). Note also, that for any practical purpose, schema files can be stored
  1237. using only the MD5 hash as a key, since it is highly improbable that two different schema files will have the same MD5 hash (unless consciously created that way). MD5 hash
  1238. values are always in <strong>lower case</strong>.
  1239. </p>
  1240. </section2>
  1241. <section2 topic='Uploading vs. Downloading schemas'>
  1242. <p>
  1243. When the server lacks information about a given XML schema, the client has two options for updating the server. Either it uploads the schema, or it asks the server to
  1244. download one.
  1245. </p>
  1246. <p>
  1247. Uploading a schema has the advantage, that the client knows exactly the version that the server requires. It has the disadvantage, that the client needs to store the schema
  1248. and send a possible large schema to the server. If EXI is used because the device has limited memory, uploading a schema might not be an option.
  1249. </p>
  1250. <p>
  1251. Downloading a schema has the advantage, that size of schema does not matter. The disadvantage is that asynchronous errors might occur, so the client needs to pay attention
  1252. to the responses returned by the server when downloading schemas. Also, downloading a schema, might download a version which does not correspond to the desired version
  1253. of the schema. So, it's more important in this case that the client checks that the server actually has the version of the schema required by the client.
  1254. </p>
  1255. </section2>
  1256. <section2 topic='Server decompression and recompression vs. binary forwarding'>
  1257. <p>
  1258. If two XMPP clients communicate with each other through an XMPP server, and both clients use EXI compression, the server must only forward
  1259. binary packets if both EXI compressed channels have exactly the same setup. If any parameter is different, the server MUST always recompress
  1260. packets sent through it.
  1261. </p>
  1262. <p>
  1263. Since the server always needs to decompress incoming EXI compressed packets to decode headers, omitting the compression part might save the server
  1264. some processing power, but not all. Note that, in some networks it might be common using similar compression settings, while in others different compression
  1265. settings are most common.
  1266. </p>
  1267. <p>
  1268. Also note that binary forwarding is only possible if session-wide buffers are not used.
  1269. </p>
  1270. </section2>
  1271. <section2 topic="Snapshot Repository for Well-known Schemas" anchor='wellknown'>
  1272. <!-- [YD] -->
  1273. <!-- TODO: Should be in section Implementation Notes. This section is for the protocol schema, not the schemas used for compression. -->
  1274. <p>
  1275. Errata and other updates may happen to well-known schemas. Slightest
  1276. modification to XML schemas may break interoperability of EXI
  1277. nodes. However, negotiating everything is not efficient. Well-known
  1278. and aged schemas that referred from the schema for EXI/XMPP shall be
  1279. snapshoted for use in EXI processors.
  1280. <!-- TODO: [PW] Why not efficient? In terms of total amount of communication performed during a device's lifetime, its a very very small fraction (insignificant).
  1281. This is a subjective opinion, termed in absolute phraseology. -->
  1282. </p>
  1283. <p>
  1284. Actual snapshot is located in (TBD-URL).
  1285. </p>
  1286. </section2>
  1287. <section2 topic='Generation of Canonic Schemas'>
  1288. <p>
  1289. The interface between the XMPP engine, whether in the client or the server, and the EXI compression engine is required to provide the engine
  1290. with ONE XML Schema to use during the compression. The <link url='http://www.w3.org/TR/exi/'>Efficient XML Interchange (EXI) Format</link>
  1291. also specifies the use of Schema IDs identifying the schema to use.
  1292. </p>
  1293. <p>
  1294. However, in the XMPP case, the schema to provide to the EXI compression engine must be created dynamically based on the handshake provided during
  1295. setup of the connection. Since this generation must be done both on the server side as well as the client side, it is important that the schemas be
  1296. created semantically equivalent. This section describes how to create such schemas, henceforth called <strong>Canonical Schemas</strong> is described
  1297. in this section.
  1298. </p>
  1299. <p>
  1300. A canonical schema is simply a wrapper importing each of the schemas negotiated for the connection. The schemas MUST be imported in ascending namespace
  1301. order.
  1302. </p>
  1303. <p>
  1304. After generating the canonical schema, it's a good idea to create a corresponding Configuration ID. The Configuration ID however, includes not only
  1305. the schemas imported into the canonical schema, but also the EXI options to use during compression/decompression. The canonical schema should be
  1306. persisted for simple reuse when quick setup is used.
  1307. </p>
  1308. <p>
  1309. The target namespace of the canonical schema MUST be <strong>urn:xmpp:exi:cs</strong>.
  1310. </p>
  1311. <p>
  1312. The Schema ID to use is irrelevant in the XMPP layer of communiction. Therefore, the server and client can create their own Schema IDs, according to some
  1313. algorithm. It is not important if the Schema IDs match, since they are not used in data transmitted between the client and server.
  1314. </p>
  1315. </section2>
  1316. <section2 topic="Using EXI Option Documents for Shortcut Setup" anchor="shortcut">
  1317. <p>
  1318. The <strong>configurationId</strong> attribute has a similar attribute called <strong>configurationLocation</strong>. This attribute provides
  1319. a mechanism to setup an EXI connection rapidly using option documents installed as files on the server or available on the network accessible
  1320. through an URL.
  1321. </p>
  1322. <p>
  1323. A client may specify a configurationId or configurationLocation on exi:setup element. If the server has corresponding setup configuration, the server may respond with an exi:setupResponse with <strong>agreement="true"</strong>. If the server does not know the configurationId or does not be able to use the given configurationLocation, the server shall respond with an exi:setupResponse with <strong>agreement="false"</strong>.
  1324. </p>
  1325. <p>
  1326. This specification does not define the format of this Configuration Location attribute, and so it is server specific, or if it is supported.
  1327. If used on a server not supporting this attribute, or if the contents of the attribute is invalid, the server returns an <strong>agreement=false</strong>
  1328. response. Otherwise the semantics of the <strong>configurationLocation</strong> attribute is the same as for the <strong>configurationId</strong>
  1329. attribute, except it provide a mechism for static configurations, while the <strong>configurationId</strong> provides a mechanism for
  1330. dynamic configurations.
  1331. </p>
  1332. <p>
  1333. The format for these opton documents or locations is beyond the scope of this specification.
  1334. </p>
  1335. <p>
  1336. The format for these opton documents or locations is beyond the scope of this specification.
  1337. </p>
  1338. <section3 topic="Shortcut Setup for Alternative Transport Binding" anchor="shortcutAltBind">
  1339. <p>With alternative transport bind, following rule for shortcut may be used, assuming a server and a client have common shared configuration with configurationId="01234" as an example.</p>
  1340. <ul>
  1341. <li>
  1342. Client can start configured stream with a <strong>exi:streamStart</strong> element encoded in the configuration given in configurationId="01234". To indicate configurationId, a schemaId corresponds to the configurationId prefixed by "c:" SHALL be used. In this example, schemaId is "c:01234". EXI option in EXI option header other than the schemaId SHOULD NOT be specified.
  1343. </li>
  1344. <li>
  1345. If the server accepts the configuration, the server SHOULD respond with a <strong>exi:streamStart</strong> element encoded in the configuration given in the configurationId. The server SHALL put the schemaId in the EXI header of the response. No EXI options other than the schemaId SHOULD NOT be specified in the response EXI header. The EXI header is the indication of configuration agreement and SHALL NOT be omitted.
  1346. </li>
  1347. <li>
  1348. If the server does not accept the configuration, the server SHALL respond with a <strong>exi:streamEnd</strong> element encoded in the <link url="#defaultSchema">default schema</link> and the EXI header option SHOULD be empty.
  1349. </li>
  1350. <li>
  1351. The client can continue pre-configured stream if and only if it receives <strong>exi:streamStart</strong> element encoded in the configurationId with EXI option header that contains the identical schemaId. Otherwise, the client SHOULD start a new <strong>exi:streamStart</strong> with a new TCP connection an empty EXI option header (e.g. default schema). Current TCP connection SHOULD NOT be used for re-negotiation (configuration setup).
  1352. </li>
  1353. </ul>
  1354. </section3>
  1355. </section2>
  1356. <section2 topic="XMPP Schema files and their hash values" anchor="knownhashes">
  1357. <p>
  1358. The following table lists XMPP schemas at the time of writing, and their corresponding bytes sizes and MD5 Hash values.
  1359. </p>
  1360. <table>
  1361. <tr>
  1362. <th>Namespace</th>
  1363. <th>Schema</th>
  1364. <th>Bytes</th>
  1365. <th>MD5 hash</th>
  1366. </tr>
  1367. <tr>
  1368. <td>http://etherx.jabber.org/streams</td>
  1369. <td>
  1370. <link url="http://xmpp.org/schemas/streams.xsd">streams.xsd</link>
  1371. </td>
  1372. <td>3450</td>
  1373. <td>68719b98725477c46a70958d1ea7c781</td>
  1374. </tr>
  1375. <tr>
  1376. <td>http://jabber.org/features/amp</td>
  1377. <td>
  1378. <link url="http://xmpp.org/schemas/amp-feature.xsd">amp-feature.xsd</link>
  1379. </td>
  1380. <td>635</td>
  1381. <td>cb4f48c999c1cce15df4f3129e55f381</td>
  1382. </tr>
  1383. <tr>
  1384. <td>http://jabber.org/features/compress</td>
  1385. <td>
  1386. <link url="http://xmpp.org/schemas/compress-feature.xsd">compress-feature.xsd</link>
  1387. </td>
  1388. <td>670</td>
  1389. <td>8ff631b7aaf9a196470ec57897251f7c</td>
  1390. </tr>
  1391. <tr>
  1392. <td>http://jabber.org/protocol/activity</td>
  1393. <td>
  1394. <link url="http://xmpp.org/schemas/activity.xsd">activity.xsd</link>
  1395. </td>
  1396. <td>5043</td>
  1397. <td>b6168aac76260aed41071fbe5c930279</td>
  1398. </tr>
  1399. <tr>
  1400. <td>http://jabber.org/protocol/address</td>
  1401. <td>
  1402. <link url="http://xmpp.org/schemas/address.xsd">address.xsd</link>
  1403. </td>
  1404. <td>1915</td>
  1405. <td>8770419083d7f4044ee4b55e39e3c6e3</td>
  1406. </tr>
  1407. <tr>
  1408. <td>http://jabber.org/protocol/amp</td>
  1409. <td>
  1410. <link url="http://xmpp.org/schemas/amp.xsd">amp.xsd</link>
  1411. </td>
  1412. <td>1858</td>
  1413. <td>b929b5024af92ccb2f21af944e1caa6b</td>
  1414. </tr>
  1415. <tr>
  1416. <td>http://jabber.org/protocol/amp#errors</td>
  1417. <td>
  1418. <link url="http://xmpp.org/schemas/amp-errors.xsd">amp-errors.xsd</link>
  1419. </td>
  1420. <td>963</td>
  1421. <td>7a366c21bbf2060f2658e9118bfc32e9</td>
  1422. </tr>
  1423. <tr>
  1424. <td>http://jabber.org/protocol/bytestreams</td>
  1425. <td>
  1426. <link url="http://xmpp.org/schemas/bytestreams.xsd">bytestreams.xsd</link>
  1427. </td>
  1428. <td>2343</td>
  1429. <td>83211fe7c25510d9254a9aa6cf31b1e0</td>
  1430. </tr>
  1431. <tr>
  1432. <td>http://jabber.org/protocol/caps</td>
  1433. <td>
  1434. <link url="http://xmpp.org/schemas/caps.xsd">caps.xsd</link>
  1435. </td>
  1436. <td>1072</td>
  1437. <td>ed68bc908f301556d1cf9ad111c34184</td>
  1438. </tr>
  1439. <tr>
  1440. <td>http://jabber.org/protocol/chatstates</td>
  1441. <td>
  1442. <link url="http://xmpp.org/schemas/chatstates.xsd">chatstates.xsd</link>
  1443. </td>
  1444. <td>827</td>
  1445. <td>c00838d97b9c2a37ac098130a27b1b4c</td>
  1446. </tr>
  1447. <tr>
  1448. <td>http://jabber.org/protocol/commands</td>
  1449. <td>
  1450. <link url="http://xmpp.org/schemas/commands.xsd">commands.xsd</link>
  1451. </td>
  1452. <td>3551</td>
  1453. <td>98b0e90b35e00b04b2253af26faaab6f</td>
  1454. </tr>
  1455. <tr>
  1456. <td>http://jabber.org/protocol/compress</td>
  1457. <td>
  1458. <link url="http://xmpp.org/schemas/compress.xsd">compress.xsd</link>
  1459. </td>
  1460. <td>1505</td>
  1461. <td>7ac2a9dc7472af2796be239dbc7097ac</td>
  1462. </tr>
  1463. <tr>
  1464. <td>http://jabber.org/protocol/compress/exi</td>
  1465. <td>
  1466. <link url="http://xmpp.org/schemas/exi.xsd">exi.xsd</link>
  1467. </td>
  1468. <td>15339</td>
  1469. <td>4c33b8ac3b902582f50e25233dc0737c</td>
  1470. </tr>
  1471. <tr>
  1472. <td>http://jabber.org/protocol/disco#info</td>
  1473. <td>
  1474. <link url="http://xmpp.org/schemas/disco-info.xsd">disco-info.xsd</link>
  1475. </td>
  1476. <td>1783</td>
  1477. <td>d5e696ad7aa800cba7f54740b0e2a6c8</td>
  1478. </tr>
  1479. <tr>
  1480. <td>http://jabber.org/protocol/disco#items</td>
  1481. <td>
  1482. <link url="http://xmpp.org/schemas/disco-items.xsd">disco-items.xsd</link>
  1483. </td>
  1484. <td>1482</td>
  1485. <td>6010e2e5dafd587fc1609987805c7295</td>
  1486. </tr>
  1487. <tr>
  1488. <td>http://jabber.org/protocol/feature-neg</td>
  1489. <td>
  1490. <link url="http://xmpp.org/schemas/feature-neg.xsd">feature-neg.xsd</link>
  1491. </td>
  1492. <td>766</td>
  1493. <td>a154eeb514f8acbe0291c48d4e7335a5</td>
  1494. </tr>
  1495. <tr>
  1496. <td>http://jabber.org/protocol/geoloc</td>
  1497. <td>
  1498. <link url="http://xmpp.org/schemas/geoloc.xsd">geoloc.xsd</link>
  1499. </td>
  1500. <td>2322</td>
  1501. <td>90b0df99a0e6ee77929955b63b384656</td>
  1502. </tr>
  1503. <tr>
  1504. <td>http://jabber.org/protocol/http-auth</td>
  1505. <td>
  1506. <link url="http://xmpp.org/schemas/http-auth.xsd">http-auth.xsd</link>
  1507. </td>
  1508. <td>1020</td>
  1509. <td>fdd34da7014b044fd659091843d802cd</td>
  1510. </tr>
  1511. <tr>
  1512. <td>http://jabber.org/protocol/httpbind</td>
  1513. <td>
  1514. <link url="http://xmpp.org/schemas/httpbind.xsd">httpbind.xsd</link>
  1515. </td>
  1516. <td>4028</td>
  1517. <td>59559ed6a5025c2e4ecf1a9ad675c707</td>
  1518. </tr>
  1519. <tr>
  1520. <td>http://jabber.org/protocol/ibb</td>
  1521. <td>
  1522. <link url="http://xmpp.org/schemas/ibb.xsd">ibb.xsd</link>
  1523. </td>
  1524. <td>1557</td>
  1525. <td>45bac4486abb974f0d92ee98d8e356de</td>
  1526. </tr>
  1527. <tr>
  1528. <td>http://jabber.org/protocol/mood</td>
  1529. <td>
  1530. <link url="http://xmpp.org/schemas/mood.xsd">mood.xsd</link>
  1531. </td>
  1532. <td>3994</td>
  1533. <td>93bb8be5dab135b7189c475f3d80a03a</td>
  1534. </tr>
  1535. <tr>
  1536. <td>http://jabber.org/protocol/muc</td>
  1537. <td>
  1538. <link url="http://xmpp.org/schemas/muc.xsd">muc.xsd</link>
  1539. </td>
  1540. <td>1322</td>
  1541. <td>853ad555f102bb2b71da9a2f2787f4f9</td>
  1542. </tr>
  1543. <tr>
  1544. <td>http://jabber.org/protocol/muc#admin</td>
  1545. <td>
  1546. <link url="http://xmpp.org/schemas/muc-admin.xsd">muc-admin.xsd</link>
  1547. </td>
  1548. <td>2260</td>
  1549. <td>627d39d09e18208f0b068ff3ee1e4dc2</td>
  1550. </tr>
  1551. <tr>
  1552. <td>http://jabber.org/protocol/muc#owner</td>
  1553. <td>
  1554. <link url="http://xmpp.org/schemas/muc-owner.xsd">muc-owner.xsd</link>
  1555. </td>
  1556. <td>1284</td>
  1557. <td>6e4e2257c1a4ba937fbdf71664a7e793</td>
  1558. </tr>
  1559. <tr>
  1560. <td>http://jabber.org/protocol/muc#unique</td>
  1561. <td>
  1562. <link url="http://xmpp.org/schemas/muc-unique.xsd">muc-unique.xsd</link>
  1563. </td>
  1564. <td>512</td>
  1565. <td>43f77e28d5574453f1208c653a4eb710</td>
  1566. </tr>
  1567. <tr>
  1568. <td>http://jabber.org/protocol/muc#user</td>
  1569. <td>
  1570. <link url="http://xmpp.org/schemas/muc-user.xsd">muc-user.xsd</link>
  1571. </td>
  1572. <td>3881</td>
  1573. <td>4c2643e702a591ed09dd4e1af15f46f5</td>
  1574. </tr>
  1575. <tr>
  1576. <td>http://jabber.org/protocol/nick</td>
  1577. <td>
  1578. <link url="http://xmpp.org/schemas/nick.xsd">nick.xsd</link>
  1579. </td>
  1580. <td>498</td>
  1581. <td>280d55dac18c98559ea514e822d692d1</td>
  1582. </tr>
  1583. <tr>
  1584. <td>http://jabber.org/protocol/offline</td>
  1585. <td>
  1586. <link url="http://xmpp.org/schemas/offline.xsd">offline.xsd</link>
  1587. </td>
  1588. <td>1157</td>
  1589. <td>e0c329c185c3339480a78b8662be92a0</td>
  1590. </tr>
  1591. <tr>
  1592. <td>http://jabber.org/protocol/pubsub</td>
  1593. <td>
  1594. <link url="http://xmpp.org/schemas/pubsub.xsd">pubsub.xsd</link>
  1595. </td>
  1596. <td>7296</td>
  1597. <td>18b754fd463509c7c95bde5a6bf54a07</td>
  1598. </tr>
  1599. <tr>
  1600. <td>http://jabber.org/protocol/pubsub#errors</td>
  1601. <td>
  1602. <link url="http://xmpp.org/schemas/pubsub-errors.xsd">pubsub-errors.xsd</link>
  1603. </td>
  1604. <td>4637</td>
  1605. <td>20479f150ffe1fa932da529528d89aa0</td>
  1606. </tr>
  1607. <tr>
  1608. <td>http://jabber.org/protocol/pubsub#event</td>
  1609. <td>
  1610. <link url="http://xmpp.org/schemas/pubsub-event.xsd">pubsub-event.xsd</link>
  1611. </td>
  1612. <td>4866</td>
  1613. <td>003ba8f4780822511a84cc8f83ca6c95</td>
  1614. </tr>
  1615. <tr>
  1616. <td>http://jabber.org/protocol/pubsub#owner</td>
  1617. <td>
  1618. <link url="http://xmpp.org/schemas/pubsub-owner.xsd">pubsub-owner.xsd</link>
  1619. </td>
  1620. <td>4387</td>
  1621. <td>f0d2a4733fe7991135172ff6cfec66d9</td>
  1622. </tr>
  1623. <tr>
  1624. <td>http://jabber.org/protocol/rosterx</td>
  1625. <td>
  1626. <link url="http://xmpp.org/schemas/rosterx.xsd">rosterx.xsd</link>
  1627. </td>
  1628. <td>1338</td>
  1629. <td>97bfd4958edef7fb962eba8fe38ce810</td>
  1630. </tr>
  1631. <tr>
  1632. <td>http://jabber.org/protocol/rsm</td>
  1633. <td>
  1634. <link url="http://xmpp.org/schemas/rsm.xsd">rsm.xsd</link>
  1635. </td>
  1636. <td>1379</td>
  1637. <td>340cfcdf0827a12f8ba0fbca6b28aa37</td>
  1638. </tr>
  1639. <tr>
  1640. <td>http://jabber.org/protocol/shim</td>
  1641. <td>
  1642. <link url="http://xmpp.org/schemas/shim.xsd">shim.xsd</link>
  1643. </td>
  1644. <td>911</td>
  1645. <td>989fc4e6a95c1e763ec17245ac622c1a</td>
  1646. </tr>
  1647. <tr>
  1648. <td>http://jabber.org/protocol/si</td>
  1649. <td>
  1650. <link url="http://xmpp.org/schemas/si.xsd">si.xsd</link>
  1651. </td>
  1652. <td>1530</td>
  1653. <td>d00cd67eec0a6923ad01865c507d4808</td>
  1654. </tr>
  1655. <tr>
  1656. <td>http://jabber.org/protocol/si/profile/file-transfer</td>
  1657. <td>
  1658. <link url="http://xmpp.org/schemas/file-transfer.xsd">file-transfer.xsd</link>
  1659. </td>
  1660. <td>1479</td>
  1661. <td>8fbc4d2d7972696b30132a4092336122</td>
  1662. </tr>
  1663. <tr>
  1664. <td>http://jabber.org/protocol/sipub</td>
  1665. <td>
  1666. <link url="http://xmpp.org/schemas/sipub.xsd">sipub.xsd</link>
  1667. </td>
  1668. <td>1655</td>
  1669. <td>3eafe26f5ade2fbbf0cc9d354051ead7</td>
  1670. </tr>
  1671. <tr>
  1672. <td>http://jabber.org/protocol/soap#fault</td>
  1673. <td>
  1674. <link url="http://xmpp.org/schemas/soap-fault.xsd">soap-fault.xsd</link>
  1675. </td>
  1676. <td>856</td>
  1677. <td>df3517931ab9dcc747f89e7c84851d8e</td>
  1678. </tr>
  1679. <tr>
  1680. <td>http://jabber.org/protocol/tune</td>
  1681. <td>
  1682. <link url="http://xmpp.org/schemas/tune.xsd">tune.xsd</link>
  1683. </td>
  1684. <td>1237</td>
  1685. <td>d5ba7c1a0e061e7c2c1ec325f583edfb</td>
  1686. </tr>
  1687. <tr>
  1688. <td>http://jabber.org/protocol/waitinglist</td>
  1689. <td>
  1690. <link url="http://xmpp.org/schemas/waitinglist.xsd">waitinglist.xsd</link>
  1691. </td>
  1692. <td>2431</td>
  1693. <td>45637c6ae8a3db8048edeb241d54ff3e</td>
  1694. </tr>
  1695. <tr>
  1696. <td>http://jabber.org/protocol/xdata-layout</td>
  1697. <td>
  1698. <link url="http://xmpp.org/schemas/xdata-layout.xsd">xdata-layout.xsd</link>
  1699. </td>
  1700. <td>2021</td>
  1701. <td>c74f116543466f6a39352a2f95bc5e2d</td>
  1702. </tr>
  1703. <tr>
  1704. <td>http://jabber.org/protocol/xdata-validate</td>
  1705. <td>
  1706. <link url="http://xmpp.org/schemas/xdata-validate.xsd">xdata-validate.xsd</link>
  1707. </td>
  1708. <td>1874</td>
  1709. <td>0ace852dda1d5e9a72427515e934b342</td>
  1710. </tr>
  1711. <tr>
  1712. <td>http://jabber.org/protocol/xhtml-im</td>
  1713. <td>
  1714. <link url="http://xmpp.org/schemas/xhtml-im-wrapper.xsd">xhtml-im-wrapper.xsd</link>
  1715. </td>
  1716. <td>1402</td>
  1717. <td>a3733bf495c05653e86ef20a825c62cb</td>
  1718. </tr>
  1719. <tr>
  1720. <td>http://www.w3.org/XML/1998/namespace</td>
  1721. <td>
  1722. <link url="http://xmpp.org/schemas/xml.xsd">xml.xsd</link>
  1723. </td>
  1724. <td>4726</td>
  1725. <td>2e2cf9072dc058dcda41b7ee77a5cb54</td>
  1726. </tr>
  1727. <tr>
  1728. <td>jabber:client</td>
  1729. <td>
  1730. <link url="http://xmpp.org/schemas/jabber-client.xsd">jabber-client.xsd</link>
  1731. </td>
  1732. <td>6968</td>
  1733. <td>5e2d5cbf0506e3f16336d295093d66c4</td>
  1734. </tr>
  1735. <tr>
  1736. <td>jabber:component:accept</td>
  1737. <td>
  1738. <link url="http://xmpp.org/schemas/component-accept.xsd">component-accept.xsd</link>
  1739. </td>
  1740. <td>6635</td>
  1741. <td>eb052d6aadc60e4a704728e68e9b71b4</td>
  1742. </tr>
  1743. <tr>
  1744. <td>jabber:component:connect</td>
  1745. <td>
  1746. <link url="http://xmpp.org/schemas/component-connect.xsd">component-connect.xsd</link>
  1747. </td>
  1748. <td>6637</td>
  1749. <td>74497cf7c9a306fdbd3c336d471dba87</td>
  1750. </tr>
  1751. <tr>
  1752. <td>jabber:iq:auth</td>
  1753. <td>
  1754. <link url="http://xmpp.org/schemas/iq-auth.xsd">iq-auth.xsd</link>
  1755. </td>
  1756. <td>1075</td>
  1757. <td>524d617af8f30feae26b92cd83a21d7f</td>
  1758. </tr>
  1759. <tr>
  1760. <td>jabber:iq:gateway</td>
  1761. <td>
  1762. <link url="http://xmpp.org/schemas/iq-gateway.xsd">iq-gateway.xsd</link>
  1763. </td>
  1764. <td>766</td>
  1765. <td>736df8b8976add34b6065512dad8352f</td>
  1766. </tr>
  1767. <tr>
  1768. <td>jabber:iq:last</td>
  1769. <td>
  1770. <link url="http://xmpp.org/schemas/iq-last.xsd">iq-last.xsd</link>
  1771. </td>
  1772. <td>700</td>
  1773. <td>93a08299e6a987209704502256b21721</td>
  1774. </tr>
  1775. <tr>
  1776. <td>jabber:iq:oob</td>
  1777. <td>
  1778. <link url="http://xmpp.org/schemas/iq-oob.xsd">iq-oob.xsd</link>
  1779. </td>
  1780. <td>739</td>
  1781. <td>556fa1cd4d36ae1780ed2e0c1053c296</td>
  1782. </tr>
  1783. <tr>
  1784. <td>jabber:iq:pass</td>
  1785. <td>
  1786. <link url="http://xmpp.org/schemas/iq-pass.xsd">iq-pass.xsd</link>
  1787. </td>
  1788. <td>1274</td>
  1789. <td>4cf2bab840ce9d592f573db2d1dde1ef</td>
  1790. </tr>
  1791. <tr>
  1792. <td>jabber:iq:privacy</td>
  1793. <td>
  1794. <link url="http://xmpp.org/schemas/iq-privacy.xsd">iq-privacy.xsd</link>
  1795. </td>
  1796. <td>3116</td>
  1797. <td>1dfec6d0dbd1f625f46fb3f68c188338</td>
  1798. </tr>
  1799. <tr>
  1800. <td>jabber:iq:private</td>
  1801. <td>
  1802. <link url="http://xmpp.org/schemas/iq-private.xsd">iq-private.xsd</link>
  1803. </td>
  1804. <td>605</td>
  1805. <td>b8d0aebb2370a2f8658304ba57677623</td>
  1806. </tr>
  1807. <tr>
  1808. <td>jabber:iq:register</td>
  1809. <td>
  1810. <link url="http://xmpp.org/schemas/iq-register.xsd">iq-register.xsd</link>
  1811. </td>
  1812. <td>2598</td>
  1813. <td>b79db0064b527f0da817e90333896eac</td>
  1814. </tr>
  1815. <tr>
  1816. <td>jabber:iq:roster</td>
  1817. <td>
  1818. <link url="http://xmpp.org/schemas/roster.xsd">roster.xsd</link>
  1819. </td>
  1820. <td>1898</td>
  1821. <td>936bbba0ef836bc173735c3b416ff553</td>
  1822. </tr>
  1823. <tr>
  1824. <td>jabber:iq:rpc</td>
  1825. <td>
  1826. <link url="http://xmpp.org/schemas/jabber-rpc.xsd">jabber-rpc.xsd</link>
  1827. </td>
  1828. <td>4853</td>
  1829. <td>351909f64a5a6b66c35972a53d498e88</td>
  1830. </tr>
  1831. <tr>
  1832. <td>jabber:iq:search</td>
  1833. <td>
  1834. <link url="http://xmpp.org/schemas/iq-search.xsd">iq-search.xsd</link>
  1835. </td>
  1836. <td>1574</td>
  1837. <td>1f202602ae9b46d43a6e5791d8c54d93</td>
  1838. </tr>
  1839. <tr>
  1840. <td>jabber:iq:time</td>
  1841. <td>
  1842. <link url="http://xmpp.org/schemas/iq-time.xsd">iq-time.xsd</link>
  1843. </td>
  1844. <td>933</td>
  1845. <td>dde555d546b4f460ba3abb9848acc2aa</td>
  1846. </tr>
  1847. <tr>
  1848. <td>jabber:iq:version</td>
  1849. <td>
  1850. <link url="http://xmpp.org/schemas/iq-version.xsd">iq-version.xsd</link>
  1851. </td>
  1852. <td>763</td>
  1853. <td>22a89a8dcf2fb54710b534b85333f5a7</td>
  1854. </tr>
  1855. <tr>
  1856. <td>jabber:server</td>
  1857. <td>
  1858. <link url="http://xmpp.org/schemas/jabber-server.xsd">jabber-server.xsd</link>
  1859. </td>
  1860. <td>6948</td>
  1861. <td>dd95bd3055dfdd69984ed427cd6356e0</td>
  1862. </tr>
  1863. <tr>
  1864. <td>jabber:server:dialback</td>
  1865. <td>
  1866. <link url="http://xmpp.org/schemas/dialback.xsd">dialback.xsd</link>
  1867. </td>
  1868. <td>1606</td>
  1869. <td>ddb71d38501ceea6dbf04b96aeabd6fc</td>
  1870. </tr>
  1871. <tr>
  1872. <td>jabber:x:conference</td>
  1873. <td>
  1874. <link url="http://xmpp.org/schemas/x-conference.xsd">x-conference.xsd</link>
  1875. </td>
  1876. <td>1339</td>
  1877. <td>d06113e71790a8b4f92fe38d0e76dda6</td>
  1878. </tr>
  1879. <tr>
  1880. <td>jabber:x:data</td>
  1881. <td>
  1882. <link url="http://xmpp.org/schemas/x-data.xsd">x-data.xsd</link>
  1883. </td>
  1884. <td>3562</td>
  1885. <td>ed9ac8c241c7f6503887c86b3d9ef2f1</td>
  1886. </tr>
  1887. <tr>
  1888. <td>jabber:x:delay</td>
  1889. <td>
  1890. <link url="http://xmpp.org/schemas/x-delay.xsd">x-delay.xsd</link>
  1891. </td>
  1892. <td>940</td>
  1893. <td>60cbc644095747e5f5e987845ce3a233</td>
  1894. </tr>
  1895. <tr>
  1896. <td>jabber:x:encrypted</td>
  1897. <td>
  1898. <link url="http://xmpp.org/schemas/x-encrypted.xsd">x-encrypted.xsd</link>
  1899. </td>
  1900. <td>469</td>
  1901. <td>95816171d561dad6d412112bb698aed4</td>
  1902. </tr>
  1903. <tr>
  1904. <td>jabber:x:event</td>
  1905. <td>
  1906. <link url="http://xmpp.org/schemas/x-event.xsd">x-event.xsd</link>
  1907. </td>
  1908. <td>1013</td>
  1909. <td>305f4bef3c118b9d3d11d96aea753026</td>
  1910. </tr>
  1911. <tr>
  1912. <td>jabber:x:expire</td>
  1913. <td>
  1914. <link url="http://xmpp.org/schemas/x-expire.xsd">x-expire.xsd</link>
  1915. </td>
  1916. <td>916</td>
  1917. <td>2c4f88b96a5ba140532788ca47c6216e</td>
  1918. </tr>
  1919. <tr>
  1920. <td>jabber:x:oob</td>
  1921. <td>
  1922. <link url="http://xmpp.org/schemas/x-oob.xsd">x-oob.xsd</link>
  1923. </td>
  1924. <td>668</td>
  1925. <td>d85e431c630889f65e3139d947be1cca</td>
  1926. </tr>
  1927. <tr>
  1928. <td>jabber:x:roster</td>
  1929. <td>
  1930. <link url="http://xmpp.org/schemas/x-roster.xsd">x-roster.xsd</link>
  1931. </td>
  1932. <td>1077</td>
  1933. <td>00cb233dee83919067559c5dcee04f3d</td>
  1934. </tr>
  1935. <tr>
  1936. <td>jabber:x:signed</td>
  1937. <td>
  1938. <link url="http://xmpp.org/schemas/x-signed.xsd">x-signed.xsd</link>
  1939. </td>
  1940. <td>463</td>
  1941. <td>979b382c4f4b0d9278f184f078e291c3</td>
  1942. </tr>
  1943. <tr>
  1944. <td>roster:delimiter</td>
  1945. <td>
  1946. <link url="http://xmpp.org/schemas/delimiter.xsd">delimiter.xsd</link>
  1947. </td>
  1948. <td>435</td>
  1949. <td>aa7d17ef59561634d78a5c3acf0cc23c</td>
  1950. </tr>
  1951. <tr>
  1952. <td>storage:bookmarks</td>
  1953. <td>
  1954. <link url="http://xmpp.org/schemas/bookmarks.xsd">bookmarks.xsd</link>
  1955. </td>
  1956. <td>1588</td>
  1957. <td>a500b821a46a4dece20671abe259c4fd</td>
  1958. </tr>
  1959. <tr>
  1960. <td>storage:rosternotes</td>
  1961. <td>
  1962. <link url="http://xmpp.org/schemas/rosternotes.xsd">rosternotes.xsd</link>
  1963. </td>
  1964. <td>1045</td>
  1965. <td>2d5a4c3e97af7650a941b74473b18903</td>
  1966. </tr>
  1967. <tr>
  1968. <td>urn:ietf:params:xml:ns:xmpp-bind</td>
  1969. <td>
  1970. <link url="http://xmpp.org/schemas/bind.xsd">bind.xsd</link>
  1971. </td>
  1972. <td>852</td>
  1973. <td>ef4bc7405e969b05e1df4c0f8fbb5e71</td>
  1974. </tr>
  1975. <tr>
  1976. <td>urn:ietf:params:xml:ns:xmpp-e2e</td>
  1977. <td>
  1978. <link url="http://xmpp.org/schemas/e2e.xsd">e2e.xsd</link>
  1979. </td>
  1980. <td>598</td>
  1981. <td>da2132f0a69fc389685a7c8fe7f66e92</td>
  1982. </tr>
  1983. <tr>
  1984. <td>urn:ietf:params:xml:ns:xmpp-sasl</td>
  1985. <td>
  1986. <link url="http://xmpp.org/schemas/sasl.xsd">sasl.xsd</link>
  1987. </td>
  1988. <td>2769</td>
  1989. <td>fd9a83f5c75628486ce18c0eb3a35995</td>
  1990. </tr>
  1991. <tr>
  1992. <td>urn:ietf:params:xml:ns:xmpp-session</td>
  1993. <td>
  1994. <link url="http://xmpp.org/schemas/session.xsd">session.xsd</link>
  1995. </td>
  1996. <td>444</td>
  1997. <td>cc1dad32ba05d18407579b7a1c98c64b</td>
  1998. </tr>
  1999. <tr>
  2000. <td>urn:ietf:params:xml:ns:xmpp-stanzas</td>
  2001. <td>
  2002. <link url="http://xmpp.org/schemas/stanzaerror.xsd">stanzaerror.xsd</link>
  2003. </td>
  2004. <td>3133</td>
  2005. <td>1a8d21588424f9134dc497de64b10c3f</td>
  2006. </tr>
  2007. <tr>
  2008. <td>urn:ietf:params:xml:ns:xmpp-streams</td>
  2009. <td>
  2010. <link url="http://xmpp.org/schemas/streamerror.xsd">streamerror.xsd</link>
  2011. </td>
  2012. <td>3315</td>
  2013. <td>75cd95aecb9f1fd66110c3ddcf00c9b8</td>
  2014. </tr>
  2015. <tr>
  2016. <td>urn:ietf:params:xml:ns:xmpp-tls</td>
  2017. <td>
  2018. <link url="http://xmpp.org/schemas/tls.xsd">tls.xsd</link>
  2019. </td>
  2020. <td>688</td>
  2021. <td>dc18bc4da35bc1be7a6c52aa43330825</td>
  2022. </tr>
  2023. <tr>
  2024. <td>urn:xmpp:archive</td>
  2025. <td>
  2026. <link url="http://xmpp.org/schemas/archive.xsd">archive.xsd</link>
  2027. </td>
  2028. <td>10355</td>
  2029. <td>379f31dbd639e577cc3671989f89eac7</td>
  2030. </tr>
  2031. <tr>
  2032. <td>urn:xmpp:attention:0</td>
  2033. <td>
  2034. <link url="http://xmpp.org/schemas/attention.xsd">attention.xsd</link>
  2035. </td>
  2036. <td>621</td>
  2037. <td>42f9232182d298aa92f29d300d4087c5</td>
  2038. </tr>
  2039. <tr>
  2040. <td>urn:xmpp:avatar:data</td>
  2041. <td>
  2042. <link url="http://xmpp.org/schemas/avatar-data.xsd">avatar-data.xsd</link>
  2043. </td>
  2044. <td>482</td>
  2045. <td>d705ada4740d78c5d404f470e61ea06c</td>
  2046. </tr>
  2047. <tr>
  2048. <td>urn:xmpp:avatar:metadata</td>
  2049. <td>
  2050. <link url="http://xmpp.org/schemas/avatar-metadata.xsd">avatar-metadata.xsd</link>
  2051. </td>
  2052. <td>1782</td>
  2053. <td>d8cb3ff5805145161c81f73dc4f1d5dc</td>
  2054. </tr>
  2055. <tr>
  2056. <td>urn:xmpp:blocking</td>
  2057. <td>
  2058. <link url="http://xmpp.org/schemas/blocking.xsd">blocking.xsd</link>
  2059. </td>
  2060. <td>1437</td>
  2061. <td>f9540f863f741e300e4706c8f773d02d</td>
  2062. </tr>
  2063. <tr>
  2064. <td>urn:xmpp:blocking:errors</td>
  2065. <td>
  2066. <link url="http://xmpp.org/schemas/blocking-errors.xsd">blocking-errors.xsd</link>
  2067. </td>
  2068. <td>627</td>
  2069. <td>28eb443b113cbe7147cfed90834a68fd</td>
  2070. </tr>
  2071. <tr>
  2072. <td>urn:xmpp:bob</td>
  2073. <td>
  2074. <link url="http://xmpp.org/schemas/bob.xsd">bob.xsd</link>
  2075. </td>
  2076. <td>846</td>
  2077. <td>990e71ba1e657f3a587cd6f0e758c69b</td>
  2078. </tr>
  2079. <tr>
  2080. <td>urn:xmpp:captcha</td>
  2081. <td>
  2082. <link url="http://xmpp.org/schemas/captcha.xsd">captcha.xsd</link>
  2083. </td>
  2084. <td>752</td>
  2085. <td>2128162d221b39d19530769ccdedd01b</td>
  2086. </tr>
  2087. <tr>
  2088. <td>urn:xmpp:delay</td>
  2089. <td>
  2090. <link url="http://xmpp.org/schemas/delay.xsd">delay.xsd</link>
  2091. </td>
  2092. <td>762</td>
  2093. <td>34283385814c8db0dc3ad874ae57e9ab</td>
  2094. </tr>
  2095. <tr>
  2096. <td>urn:xmpp:eventlog</td>
  2097. <td>
  2098. <link url="http://xmpp.org/schemas/eventlogging.xsd">eventlogging.xsd</link>
  2099. </td>
  2100. <td>2021</td>
  2101. <td>b12ff6b4b79b1dedd7c0f6721a046fb8</td>
  2102. </tr>
  2103. <tr>
  2104. <td>urn:xmpp:features:rosterver</td>
  2105. <td>
  2106. <link url="http://xmpp.org/schemas/versioning-feature.xsd">versioning-feature.xsd</link>
  2107. </td>
  2108. <td>619</td>
  2109. <td>089d67a345ba701d21c1d3316a03c7e6</td>
  2110. </tr>
  2111. <tr>
  2112. <td>urn:xmpp:http</td>
  2113. <td>
  2114. <link url="http://xmpp.org/schemas/http-over-xmpp.xsd">http-over-xmpp.xsd</link>
  2115. </td>
  2116. <td>5135</td>
  2117. <td>51c68b927a5cc0ab4a6e8d081e100cb0</td>
  2118. </tr>
  2119. <tr>
  2120. <td>urn:xmpp:iot:concentrators</td>
  2121. <td>
  2122. <link url="http://xmpp.org/schemas/sensor-network-concentrators.xsd">sensor-network-concentrators.xsd</link>
  2123. </td>
  2124. <td>37801</td>
  2125. <td>0ea1b43d143b7857870e1397c93e6872</td>
  2126. </tr>
  2127. <tr>
  2128. <td>urn:xmpp:iot:control</td>
  2129. <td>
  2130. <link url="http://xmpp.org/schemas/sensor-network-control.xsd">sensor-network-control.xsd</link>
  2131. </td>
  2132. <td>6293</td>
  2133. <td>74dcea52300e8c8df8c4de2c9e90495b</td>
  2134. </tr>
  2135. <tr>
  2136. <td>urn:xmpp:iot:interoperability</td>
  2137. <td>
  2138. <link url="http://xmpp.org/schemas/xep-0000-IoT-Interoperability.xsd">xep-0000-IoT-Interoperability.xsd</link>
  2139. </td>
  2140. <td>1275</td>
  2141. <td>5d39845a0082715ff8807691698353bb</td>
  2142. </tr>
  2143. <tr>
  2144. <td>urn:xmpp:iot:provisioning</td>
  2145. <td>
  2146. <link url="http://xmpp.org/schemas/sensor-network-provisioning.xsd">sensor-network-provisioning.xsd</link>
  2147. </td>
  2148. <td>8856</td>
  2149. <td>3ed5360bc17eadb2a8949498c9af3f0c</td>
  2150. </tr>
  2151. <tr>
  2152. <td>urn:xmpp:iot:sensordata</td>
  2153. <td>
  2154. <link url="http://xmpp.org/schemas/sensor-data.xsd">sensor-data.xsd</link>
  2155. </td>
  2156. <td>8752</td>
  2157. <td>49b101e7deea39ccc31340a3c7871c43</td>
  2158. </tr>
  2159. <tr>
  2160. <td>urn:xmpp:jingle:1</td>
  2161. <td>
  2162. <link url="http://xmpp.org/schemas/jingle.xsd">jingle.xsd</link>
  2163. </td>
  2164. <td>4926</td>
  2165. <td>29d29c6f994ce1b1cc3d5da8c1b54d80</td>
  2166. </tr>
  2167. <tr>
  2168. <td>urn:xmpp:jingle:apps:rtp:1</td>
  2169. <td>
  2170. <link url="http://xmpp.org/schemas/jingle-apps-rtp.xsd">jingle-apps-rtp.xsd</link>
  2171. </td>
  2172. <td>3481</td>
  2173. <td>3f1d6e7fc12ebddd3c196fb44dc0912b</td>
  2174. </tr>
  2175. <tr>
  2176. <td>urn:xmpp:jingle:apps:rtp:errors:1</td>
  2177. <td>
  2178. <link url="http://xmpp.org/schemas/jingle-apps-rtp-errors.xsd">jingle-apps-rtp-errors.xsd</link>
  2179. </td>
  2180. <td>705</td>
  2181. <td>bb476ac38da026742ddb94862f8d3e1f</td>
  2182. </tr>
  2183. <tr>
  2184. <td>urn:xmpp:jingle:apps:rtp:info:1</td>
  2185. <td>
  2186. <link url="http://xmpp.org/schemas/jingle-apps-rtp-info.xsd">jingle-apps-rtp-info.xsd</link>
  2187. </td>
  2188. <td>1467</td>
  2189. <td>c8fc00ddcff8c69cf4a923c3797a9d04</td>
  2190. </tr>
  2191. <tr>
  2192. <td>urn:xmpp:jingle:apps:rtp:zrtp:1</td>
  2193. <td>
  2194. <link url="http://xmpp.org/schemas/jingle-apps-rtp-zrtp.xsd">jingle-apps-rtp-zrtp.xsd</link>
  2195. </td>
  2196. <td>732</td>
  2197. <td>9144b780fc33098ad0c5725394d53e8e</td>
  2198. </tr>
  2199. <tr>
  2200. <td>urn:xmpp:jingle:errors:1</td>
  2201. <td>
  2202. <link url="http://xmpp.org/schemas/jingle-errors.xsd">jingle-errors.xsd</link>
  2203. </td>
  2204. <td>783</td>
  2205. <td>fa8cefea805ce412615a0e19fcc90f29</td>
  2206. </tr>
  2207. <tr>
  2208. <td>urn:xmpp:jingle:transports:ibb:1</td>
  2209. <td>
  2210. <link url="http://xmpp.org/schemas/jingle-transports-ibb.xsd">jingle-transports-ibb.xsd</link>
  2211. </td>
  2212. <td>1424</td>
  2213. <td>284b6271054657577a380c654f90453f</td>
  2214. </tr>
  2215. <tr>
  2216. <td>urn:xmpp:jingle:transports:ice-udp:1</td>
  2217. <td>
  2218. <link url="http://xmpp.org/schemas/jingle-transports-ice-udp.xsd">jingle-transports-ice-udp.xsd</link>
  2219. </td>
  2220. <td>3103</td>
  2221. <td>03a3be93d48a393e5756717d74b27efc</td>
  2222. </tr>
  2223. <tr>
  2224. <td>urn:xmpp:jingle:transports:raw-udp:1</td>
  2225. <td>
  2226. <link url="http://xmpp.org/schemas/jingle-transports-raw-udp.xsd">jingle-transports-raw-udp.xsd</link>
  2227. </td>
  2228. <td>1826</td>
  2229. <td>54ab91e95e7d070a26b1b6afbd5559ca</td>
  2230. </tr>
  2231. <tr>
  2232. <td>urn:xmpp:jingle:transports:s5b:1</td>
  2233. <td>
  2234. <link url="http://xmpp.org/schemas/jingle-transports-s5b.xsd">jingle-transports-s5b.xsd</link>
  2235. </td>
  2236. <td>3336</td>
  2237. <td>fe5cb4f3077307279a7c0e5da7c5c6e7</td>
  2238. </tr>
  2239. <tr>
  2240. <td>urn:xmpp:langtrans</td>
  2241. <td>
  2242. <link url="http://xmpp.org/schemas/langtrans.xsd">langtrans.xsd</link>
  2243. </td>
  2244. <td>1934</td>
  2245. <td>42fd5d84bfdab64d405146500833ff95</td>
  2246. </tr>
  2247. <tr>
  2248. <td>urn:xmpp:langtrans:items</td>
  2249. <td>
  2250. <link url="http://xmpp.org/schemas/langtrans-items.xsd">langtrans-items.xsd</link>
  2251. </td>
  2252. <td>1500</td>
  2253. <td>c28ef67fe38aeaed5ba44e239c1c1886</td>
  2254. </tr>
  2255. <tr>
  2256. <td>urn:xmpp:media-element</td>
  2257. <td>
  2258. <link url="http://xmpp.org/schemas/media-element.xsd">media-element.xsd</link>
  2259. </td>
  2260. <td>1051</td>
  2261. <td>0d4c292aa81f6eb1ad3f8b06421e1cee</td>
  2262. </tr>
  2263. <tr>
  2264. <td>urn:xmpp:pie:0</td>
  2265. <td>
  2266. <link url="http://xmpp.org/schemas/pie.xsd">pie.xsd</link>
  2267. </td>
  2268. <td>1590</td>
  2269. <td>a1a80b05609760cc0bf73c81c48a8ab6</td>
  2270. </tr>
  2271. <tr>
  2272. <td>urn:xmpp:ping</td>
  2273. <td>
  2274. <link url="http://xmpp.org/schemas/ping.xsd">ping.xsd</link>
  2275. </td>
  2276. <td>602</td>
  2277. <td>a2a720f5ee6da310e3a05ba89b89eb20</td>
  2278. </tr>
  2279. <tr>
  2280. <td>urn:xmpp:receipts</td>
  2281. <td>
  2282. <link url="http://xmpp.org/schemas/receipts.xsd">receipts.xsd</link>
  2283. </td>
  2284. <td>879</td>
  2285. <td>e11be9d296fa183a1c06ea021fd69559</td>
  2286. </tr>
  2287. <tr>
  2288. <td>urn:xmpp:sec-label:0</td>
  2289. <td>
  2290. <link url="http://xmpp.org/schemas/sec-label.xsd">sec-label.xsd</link>
  2291. </td>
  2292. <td>3865</td>
  2293. <td>9e98b80af0f6376c24a678d14a9a642f</td>
  2294. </tr>
  2295. <tr>
  2296. <td>urn:xmpp:sec-label:catalog:2</td>
  2297. <td>
  2298. <link url="http://xmpp.org/schemas/sec-label-catalog.xsd">sec-label-catalog.xsd</link>
  2299. </td>
  2300. <td>3378</td>
  2301. <td>f63f39aaacb09726ceabf6638008b13a</td>
  2302. </tr>
  2303. <tr>
  2304. <td>urn:xmpp:sec-label:ess:0</td>
  2305. <td>
  2306. <link url="http://xmpp.org/schemas/sec-label-ess.xsd">sec-label-ess.xsd</link>
  2307. </td>
  2308. <td>804</td>
  2309. <td>99311ef62e7f29be25eb78d68baaff2a</td>
  2310. </tr>
  2311. <tr>
  2312. <td>urn:xmpp:sm:3</td>
  2313. <td>
  2314. <link url="http://xmpp.org/schemas/sm.xsd">sm.xsd</link>
  2315. </td>
  2316. <td>3583</td>
  2317. <td>392326992f88327d9958fb6afbbb4382</td>
  2318. </tr>
  2319. <tr>
  2320. <td>urn:xmpp:time</td>
  2321. <td>
  2322. <link url="http://xmpp.org/schemas/time.xsd">time.xsd</link>
  2323. </td>
  2324. <td>658</td>
  2325. <td>001c5347c00da7aad231504ec706fbb3</td>
  2326. </tr>
  2327. <tr>
  2328. <td>urn:xmpp:xbosh</td>
  2329. <td>
  2330. <link url="http://xmpp.org/schemas/xbosh.xsd">xbosh.xsd</link>
  2331. </td>
  2332. <td>760</td>
  2333. <td>0920ea082f0ba162c8b96611368941a8</td>
  2334. </tr>
  2335. <tr>
  2336. <td>urn:xmpp:xdata:color</td>
  2337. <td>
  2338. <link url="http://xmpp.org/schemas/color-parameter.xsd">color-parameter.xsd</link>
  2339. </td>
  2340. <td>522</td>
  2341. <td>6b58fcba235d4f8888b5f6db0e5dfc91</td>
  2342. </tr>
  2343. <tr>
  2344. <td>urn:xmpp:xdata:dynamic</td>
  2345. <td>
  2346. <link url="http://xmpp.org/schemas/dynamic-forms.xsd">dynamic-forms.xsd</link>
  2347. </td>
  2348. <td>2453</td>
  2349. <td>32d8760506fd010f8c9fa6e4953ed5bc</td>
  2350. </tr>
  2351. <tr>
  2352. <td>vcard-temp:x:update</td>
  2353. <td>
  2354. <link url="http://xmpp.org/schemas/vcard-avatar.xsd">vcard-avatar.xsd</link>
  2355. </td>
  2356. <td>625</td>
  2357. <td>edaf52356eb306390849641bdc33fdc9</td>
  2358. </tr>
  2359. </table>
  2360. </section2>
  2361. <section2 topic="Known problems with existing schemas" anchor="knownproblems">
  2362. <p>
  2363. The following sections list some known problems that might affect already defined schemas. For these schemas to be used
  2364. together with EXI compression, the recommended procedures should be considered. If changes to the schema is required,
  2365. new byte sizes and hash values must be computed for the changed schema correspondingly.
  2366. </p>
  2367. <p>
  2368. Patched version of XML schemas may be placed in the <link url="#wellknown">snapshot repository for well-known schemas</link> to avoid wild patches (and too many derived schema for the same model).
  2369. </p>
  2370. <section3 topic="Patch to avoid UPA for streams.xsd" anchor="patch">
  2371. <!-- [YD] -->
  2372. <p>
  2373. TBD: group discussion needed
  2374. </p>
  2375. <p>
  2376. streams.xsd defined in RFC6120 has 'unique particle attribution (UPA)' problem.
  2377. UPA is undeterministic attribution of an element between a wildcard and an explicit definition.
  2378. Details could be found in <link url="http://www.w3.org/TR/xmlschema-1/#non-ambig">Appendix H</link> of XML schema specification.
  2379. </p>
  2380. <p>
  2381. A simple
  2382. way to solve UPA is to insert delimiters around wildcards to eliminate
  2383. ambiguity. A deterministic delimiter can resolve ambiguity.
  2384. The other way to solve UPA is to use 'weak wildcard model'
  2385. introduced in XML schema 1.1. The cause of ambiguity is lack of
  2386. precedence between explicit definitions and wildcard definitions. As
  2387. weak wildcards have weaker precedence against explicit definitions,
  2388. there are no ambiguity with UPA.
  2389. </p>
  2390. <p>
  2391. To keep the same semantics with current XML implementations, by
  2392. default this proposal recommends weak wildcard model on
  2393. implementations. However, if an implementation does not support weak
  2394. wildcards, it may use streams.xsd with following patch applied.
  2395. </p>
  2396. <!-- TODO: Something seems to have happened to the indentation.
  2397. Example should be formatted better, put within <example> and CDATA elements, so it does not get destroyed by automatic indentation and XML formatting. -->
  2398. <code>
  2399. --- streams.xsd 2013-03-25 17:37:52.733451313 +0900
  2400. +++ streams-UPA-patched.xsd 2013-03-25 17:57:44.889469868 +0900
  2401. @@ -32,10 +32,12 @@
  2402. &lt;xs:any namespace='urn:ietf:params:xml:ns:xmpp-sasl'
  2403. minOccurs='0'
  2404. maxOccurs='1'/>
  2405. + &lt;xs:element name="delim" type="xs:boolean" minOccurs="1" maxOccurs="1" />
  2406. &lt;xs:any namespace='##other'
  2407. minOccurs='0'
  2408. maxOccurs='unbounded'
  2409. processContents='lax'/>
  2410. + &lt;xs:element name="delim" type="xs:boolean" minOccurs="1" maxOccurs="1" />
  2411. &lt;xs:choice minOccurs='0' maxOccurs='1'>
  2412. &lt;xs:choice minOccurs='0' maxOccurs='unbounded'>
  2413. &lt;xs:element ref='client:message'/>
  2414. @@ -77,6 +79,7 @@
  2415. &lt;xs:element ref='err:text'
  2416. minOccurs='0'
  2417. maxOccurs='1'/>
  2418. + &lt;xs:element name="delim" type="xs:boolean" minOccurs="1" maxOccurs="1" />
  2419. &lt;xs:any namespace='##other'
  2420. minOccurs='0'
  2421. maxOccurs='1'
  2422. </code>
  2423. </section3>
  2424. <section3 topic="Patch for missing wildcards in extensible schemas">
  2425. <!-- [PW]: Example missing wildcard definition in data forms, in relation to data form validation, data form layout, etc. -->
  2426. </section3>
  2427. </section2>
  2428. <section2 topic="Default schema for alternative bindings" anchor="defaultSchema">
  2429. <p>
  2430. Default EXI grammar used in EXI/XMPP SHALL be equivalent to the EXI grammar defined by the following schema. The default EXI grammar
  2431. is used in initiating connection of EXI/XMPP alternate binding. The default schema is defined by following definition, and all
  2432. the imported schemas SHOULD be same schemas described in <link url="#wellknown">the snapshot</link> and SHOULD have the identical
  2433. MD5 hash value described in <link url="#knownhashes">this section</link>.
  2434. </p>
  2435. <code>
  2436. <![CDATA[
  2437. <?xml version="1.0" encoding="UTF-8"?>
  2438. <xs:schema
  2439. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  2440. xmlns:stream="http://etherx.jabber.org/streams"
  2441. targetNamespace="urn:xmpp:exi:cs"
  2442. elementFormDefault="qualified">
  2443. <xs:import namespace="http://etherx.jabber.org/streams"
  2444. schemaLocation="${snapshot_url}/streams.xsd" />
  2445. <xs:import namespace="http://jabber.org/protocol/compress/exi"
  2446. schemaLocation="${snapshot_url}/xep-0322-01.xsd" />
  2447. </xs:schema>
  2448. ]]>
  2449. </code>
  2450. <p>
  2451. The ${snapshot-url} corresponds to yet-to-be-specified schema snapshot repository described in <link url="#wellknown">snapshot repository for well-known schemas</link> section.
  2452. The schemaId of this schema will is 'urn:xmpp:exi:default'. SchemaId is ID for this instance and not a namespace identifier and intentionally different from the target namespace of the schema.
  2453. </p>
  2454. </section2>
  2455. <section2 topic="Reserved Schema IDs" anchor="reservedSchemaID">
  2456. <!-- [YD] required for alternative bindings -->
  2457. <p>Following schema Ids are reserved.</p>
  2458. <ul>
  2459. <li>
  2460. Schema IDs starts with "c:". This is used as <link url="#shortcutaltBind">shortcut setup for alternative transport binding</link>.
  2461. </li>
  2462. <li>Schema IDs starts with "urn:xmpp". This may be used to describe XEP-based schemas.</li>
  2463. </ul>
  2464. </section2>
  2465. </section1>
  2466. <section1 topic='Security Considerations' anchor='security'>
  2467. <p>
  2468. Note that EXI compressed information, even though it is hard to decode by humans, is by no means encrypted. If sensitive data is to be sent over an EXI compressed
  2469. channel, encryption should be considered as well.
  2470. </p>
  2471. <p>
  2472. The reason for using MD5 as a hashing mechanism to identify schema versions, is because MD5 has a small memory footprint and is easy to implement.
  2473. However, it has a weakness: Given a hash value, it's relatively easy to create another file returning the same hash value. However, it's very
  2474. difficult to create another file of the same size as the original, resulting in the same hash value. For this reason, file sizes are also included
  2475. when identifying a schema. Since the security threat, and any possible consequences of somebody trying to inject invalid schemas to a server is
  2476. relatively small, this is considered a sufficient protection against such threats.
  2477. </p>
  2478. <p>
  2479. The feature of uploading and downloading new schemas to the server is a feature that the server can disable for exceptional high security reasons, for instance,
  2480. in high-security installations where total control of the domain is necessary. Clients should be aware
  2481. if this fact and check setup after uploading or asking the server to download new schemas. If the setup fails a second time, i.e. schemas are still missing,
  2482. the client MUST NOT try to upload or download the missing schemas again, since this would provoke an indefinite loop.
  2483. </p>
  2484. </section1>
  2485. <section1 topic='IANA Considerations' anchor='iana'>
  2486. <p>
  2487. <!-- [YD] static port number is optional -->
  2488. This XEP requires new service names (proposed 'xmpp-bclient' and 'xmpp-bserver') for SRV records registered in IANA.
  2489. A static port number for a dedicated binary EXI/XMPP binding may also be requested.
  2490. </p>
  2491. </section1>
  2492. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  2493. <p>
  2494. Some of schemas should be kept 'as-is' format in XSF registry. EXI interoperability
  2495. requires schema stability, so a snapshot repository of version-controlled well-known schemas is requested to XMPP Registrar.
  2496. Related discussion is in <link url="#wellknown">here</link>. Also, patched versions such as described in <link url="#knownproblems">Known problems</link>
  2497. should be placed in the same snapshot repository.
  2498. </p>
  2499. <p>
  2500. Furthermore, it is suggested that the table at <link url="http://xmpp.org/resources/schemas/">http://xmpp.org/resources/schemas/</link> is updated
  2501. with two columns containing updated byte size and MD5 hash information for the current files. Tools can be provided by the authors to automate
  2502. the extraction of byte size and MD5 Hash information from the collection of schema files and transform them to appropriate formats.
  2503. </p>
  2504. <p>
  2505. The <link url="#schema">protocol schema</link> needs to be added to the list of <link url="http://xmpp.org/resources/schemas/">XMPP protocol schemas</link>.
  2506. </p>
  2507. <p>
  2508. The target namespace for canonical schemas <strong>urn:xmpp:exi:cs</strong>, for default schemas <strong>urn:xmpp:exi:default</strong>, as well as the EXI compress schema namespace
  2509. <strong>http://jabber.org/protocol/compress/exi</strong> need to be registered on the list of known XSF schemas.
  2510. </p>
  2511. </section1>
  2512. <section1 topic='XML Schema' anchor='schema'>
  2513. <code>
  2514. <!-- IMPORT_AS_CDATA: ./exi.xsd -->
  2515. <![CDATA[
  2516. <?xml version='1.0' encoding='UTF-8'?>
  2517. <xs:schema
  2518. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  2519. targetNamespace='http://jabber.org/protocol/compress/exi'
  2520. xmlns='http://jabber.org/protocol/compress/exi'
  2521. xmlns:xml="http://www.w3.org/XML/1998/namespace"
  2522. xmlns:client='jabber:client'
  2523. xmlns:streams='http://etherx.jabber.org/streams'
  2524. elementFormDefault='qualified'>
  2525. <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
  2526. <xs:import namespace="http://etherx.jabber.org/streams"/>
  2527. <xs:element name='setup' type='Setup'/>
  2528. <xs:element name='setupResponse' type='SetupResponse'/>
  2529. <xs:complexType name='Setup'>
  2530. <xs:choice minOccurs='0' maxOccurs='unbounded'>
  2531. <xs:element name='schema' type='Schema'/>
  2532. <xs:element name='datatypeRepresentationMap' type='DatatypeRepresentationMap'/>
  2533. </xs:choice>
  2534. <xs:attributeGroup ref='Options'/>
  2535. <xs:attribute name='configurationId' type='xs:string' use='optional'/>
  2536. <xs:attribute name='configurationLocation' type='xs:string' use='optional'/>
  2537. </xs:complexType>
  2538. <xs:complexType name='SetupResponse'>
  2539. <xs:choice minOccurs='0' maxOccurs='unbounded'>
  2540. <xs:element name='schema' type='Schema'/>
  2541. <xs:element name='datatypeRepresentationMap' type='DatatypeRepresentationMap'/>
  2542. <xs:element name='missingSchema' type='Schema'/>
  2543. </xs:choice>
  2544. <xs:attributeGroup ref='Options'/>
  2545. <xs:attribute name='configurationId' type='xs:string' use='optional'/>
  2546. <xs:attribute name='configurationLocation' type='xs:string' use='optional'/>
  2547. <xs:attribute name='agreement' type='xs:boolean' use='optional' default='false'/>
  2548. </xs:complexType>
  2549. <xs:complexType name='Schema'>
  2550. <xs:attribute name='ns' type='xs:string' use='required'/>
  2551. <xs:attribute name='bytes' type='xs:positiveInteger' use='required'/>
  2552. <xs:attribute name='md5Hash' type='MD5Hash' use='required'/>
  2553. </xs:complexType>
  2554. <xs:complexType name='DatatypeRepresentationMap'>
  2555. <xs:attribute name='type' type='xs:string' use='required'/>
  2556. <xs:attribute name='representAs' type='xs:string' use='required'/>
  2557. </xs:complexType>
  2558. <xs:attributeGroup name='Options'>
  2559. <xs:attribute name='version' type='xs:positiveInteger' use='optional' default='1'/>
  2560. <xs:attribute name='alignment' type='Alignment' use='optional' default='bit-packed'>
  2561. <xs:annotation>
  2562. <xs:documentation>The alignment option is used to control the alignment of event codes and content items. The value is one of bit-packed, byte-alignment or pre-compression, of which bit-packed is the default value assumed when the "alignment" element is absent in the EXI Options document. The option values byte-alignment and pre-compression are effected when "byte" and "pre-compress" elements are present in the EXI Options document, respectively. When the value of compression option is set to true, alignment of the EXI Body is governed by the rules specified in 9. EXI Compression instead of the alignment option value. The "alignment" element MUST NOT appear in an EXI options document when the "compression" element is present.</xs:documentation>
  2563. </xs:annotation>
  2564. </xs:attribute>
  2565. <xs:attribute name='compression' type='xs:boolean' use='optional' default='false'>
  2566. <xs:annotation>
  2567. <xs:documentation>The compression option is a Boolean used to increase compactness using additional computational resources. The default value "false" is assumed when the "compression" element is absent in the EXI Options document whereas its presence denotes the value "true". When set to true, the event codes and associated content are compressed according to 9. EXI Compression regardless of the alignment option value. As mentioned above, the "compression" element MUST NOT appear in an EXI options document when the "alignment" element is present.</xs:documentation>
  2568. </xs:annotation>
  2569. </xs:attribute>
  2570. <xs:attribute name='strict' type='xs:boolean' use='optional' default='false'>
  2571. <xs:annotation>
  2572. <xs:documentation>The strict option is a Boolean used to increase compactness by using a strict interpretation of the schemas and omitting preservation of certain items, such as comments, processing instructions and namespace prefixes. The default value "false" is assumed when the "strict" element is absent in the EXI Options document whereas its presence denotes the value "true". When set to true, those productions that have NS, CM, PI, ER, and SC terminal symbols are omitted from the EXI grammars, and schema-informed element and type grammars are restricted to only permit items declared in the schemas. A note in section 8.5.4.4.2 Adding Productions when Strict is True describes some additional restrictions consequential of the use of this option. The "strict" element MUST NOT appear in an EXI options document when one of "dtd", "prefixes", "comments", "pis" or "selfContained" element is present in the same options document.</xs:documentation>
  2573. </xs:annotation>
  2574. </xs:attribute>
  2575. <xs:attribute name='preserveComments' type='xs:boolean' use='optional' default='false'>
  2576. <xs:annotation>
  2577. <xs:documentation>Comments are preserved. Must not be used together with the strict option.</xs:documentation>
  2578. </xs:annotation>
  2579. </xs:attribute>
  2580. <xs:attribute name='preservePIs' type='xs:boolean' use='optional' default='false'>
  2581. <xs:annotation>
  2582. <xs:documentation>Processing instructions are preserved. Must not be used together with the strict option.</xs:documentation>
  2583. </xs:annotation>
  2584. </xs:attribute>
  2585. <xs:attribute name='preserveDTD' type='xs:boolean' use='optional' default='false'>
  2586. <xs:annotation>
  2587. <xs:documentation>DTD is preserved. Must not be used together with the strict option.</xs:documentation>
  2588. </xs:annotation>
  2589. </xs:attribute>
  2590. <xs:attribute name='preservePrefixes' type='xs:boolean' use='optional' default='false'>
  2591. <xs:annotation>
  2592. <xs:documentation>Prefixes are preserved. Must not be used together with the strict option.</xs:documentation>
  2593. </xs:annotation>
  2594. </xs:attribute>
  2595. <xs:attribute name='preserveLexical' type='xs:boolean' use='optional' default='false'>
  2596. <xs:annotation>
  2597. <xs:documentation>Lexical form of element and attribute values can be preserved in value content items. Can be used together with the strict option.</xs:documentation>
  2598. </xs:annotation>
  2599. </xs:attribute>
  2600. <xs:attribute name='selfContained' type='xs:boolean' use='optional' default='false'>
  2601. <xs:annotation>
  2602. <xs:documentation>The selfContained option is a Boolean used to enable the use of self-contained elements in the EXI stream. Self-contained elements may be read independently from the rest of the EXI body, allowing them to be indexed for random access. The "selfContained" element MUST NOT appear in an EXI options document when one of "compression", "pre-compression" or "strict" elements are present in the same options document. The default value "false" is assumed when the "selfContained" element is absent from the EXI Options document whereas its presence denotes the value "true".</xs:documentation>
  2603. </xs:annotation>
  2604. </xs:attribute>
  2605. <xs:attribute name='blockSize' type='xs:positiveInteger' use='optional' default='1000000'>
  2606. <xs:annotation>
  2607. <xs:documentation>The blockSize option specifies the block size used for EXI compression. When the "blockSize" element is absent in the EXI Options document, the default blocksize of 1,000,000 is used. The default blockSize is intentionally large but can be reduced for processing large documents on devices with limited memory.</xs:documentation>
  2608. </xs:annotation>
  2609. </xs:attribute>
  2610. <xs:attribute name='valueMaxLength' type='xs:positiveInteger' use='optional'>
  2611. <xs:annotation>
  2612. <xs:documentation>The valueMaxLength option specifies the maximum length of value content items to be considered for addition to the string table. The default value "unbounded" is assumed when the "valueMaxLength" element is absent in the EXI Options document.</xs:documentation>
  2613. </xs:annotation>
  2614. </xs:attribute>
  2615. <xs:attribute name='valuePartitionCapacity' type='xs:positiveInteger' use='optional'>
  2616. <xs:annotation>
  2617. <xs:documentation>The valuePartitionCapacity option specifies the maximum number of value content items in the string table at any given time. The default value "unbounded" is assumed when the "valuePartitionCapacity" element is absent in the EXI Options document. Section 7.3.3 Partitions Optimized for Frequent use of String Literals specifies the behavior of the string table when this capacity is reached.</xs:documentation>
  2618. </xs:annotation>
  2619. </xs:attribute>
  2620. <xs:attribute name='sessionWideBuffers' type='xs:boolean' use='optional' default='false'>
  2621. <xs:annotation>
  2622. <xs:documentation>If set to true, all buffers, string tables, etc. will be maintained during the entire session. This may improve performance during time since strings
  2623. can be omitted in the compressed binary stream, but it might also in some cases degrade performance since more options are available in the tables, requiring more bits
  2624. to encode strings. The default value is false, meaning that buffers, string tables, etc., are cleared between each stanza.</xs:documentation>
  2625. </xs:annotation>
  2626. </xs:attribute>
  2627. </xs:attributeGroup>
  2628. <xs:simpleType name='MD5Hash'>
  2629. <xs:restriction base='xs:string'>
  2630. <xs:pattern value='[0-9a-f]{32}'/>
  2631. </xs:restriction>
  2632. </xs:simpleType>
  2633. <xs:simpleType name='Alignment'>
  2634. <xs:restriction base='xs:string'>
  2635. <xs:enumeration value='bit-packed'>
  2636. <xs:annotation>
  2637. <xs:documentation>The alignment option value bit-packed indicates that the event codes and associated content are packed in bits without any padding in-between.</xs:documentation>
  2638. </xs:annotation>
  2639. </xs:enumeration>
  2640. <xs:enumeration value='byte-alignment'>
  2641. <xs:annotation>
  2642. <xs:documentation>The alignment option value byte-alignment indicates that the event codes and associated content are aligned on byte boundaries. While byte-alignment generally results in EXI streams of larger sizes compared with their bit-packed equivalents, byte-alignment may provide a help in some use cases that involve frequent copying of large arrays of scalar data directly out of the stream. It can also make it possible to work with data in-place and can make it easier to debug encoded data by allowing items on aligned boundaries to be easily located in the stream.</xs:documentation>
  2643. </xs:annotation>
  2644. </xs:enumeration>
  2645. <xs:enumeration value='pre-compression'>
  2646. <xs:annotation>
  2647. <xs:documentation>The alignment option value pre-compression indicates that all steps involved in compression (see section 9. EXI Compression) are to be done with the exception of the final step of applying the DEFLATE algorithm. The primary use case of pre-compression is to avoid a duplicate compression step when compression capability is built into the transport protocol. In this case, pre-compression just prepares the stream for later compression.</xs:documentation>
  2648. </xs:annotation>
  2649. </xs:enumeration>
  2650. </xs:restriction>
  2651. </xs:simpleType>
  2652. <xs:element name='uploadSchema'>
  2653. <xs:complexType>
  2654. <xs:simpleContent>
  2655. <xs:extension base='xs:base64Binary'>
  2656. <xs:attribute name='contentType' type='ContentType' use='optional' default='Text'/>
  2657. <xs:attribute name='bytes' type='xs:positiveInteger' use='optional'/>
  2658. <xs:attribute name='md5Hash' type='MD5Hash' use='optional'/>
  2659. </xs:extension>
  2660. </xs:simpleContent>
  2661. </xs:complexType>
  2662. </xs:element>
  2663. <xs:simpleType name='ContentType'>
  2664. <xs:restriction base='xs:string'>
  2665. <xs:enumeration value='Text'/>
  2666. <xs:enumeration value='ExiBody'/>
  2667. <xs:enumeration value='ExiDocument'/>
  2668. </xs:restriction>
  2669. </xs:simpleType>
  2670. <xs:element name='downloadSchema' type='DownloadSchema'/>
  2671. <xs:element name='downloadSchemaResponse' type='DownloadSchemaResponse'/>
  2672. <xs:complexType name='DownloadSchema'>
  2673. <xs:attribute name='url' type='xs:string' use='required'/>
  2674. </xs:complexType>
  2675. <xs:complexType name='DownloadSchemaResponse'>
  2676. <xs:complexContent>
  2677. <xs:extension base='DownloadSchema'>
  2678. <xs:choice minOccurs='0' maxOccurs='1'>
  2679. <xs:element name='httpError'>
  2680. <xs:complexType>
  2681. <xs:attribute name='code' type='xs:positiveInteger' use='required'/>
  2682. <xs:attribute name='message' type='xs:string' use='required'/>
  2683. </xs:complexType>
  2684. </xs:element>
  2685. <xs:element name='invalidUrl'>
  2686. <xs:complexType>
  2687. <xs:attribute name='message' type='xs:string' use='required'/>
  2688. </xs:complexType>
  2689. </xs:element>
  2690. <xs:element name='timeout'>
  2691. <xs:complexType>
  2692. <xs:attribute name='message' type='xs:string' use='required'/>
  2693. </xs:complexType>
  2694. </xs:element>
  2695. <xs:element name='invalidContentType'>
  2696. <xs:complexType>
  2697. <xs:attribute name='contentTypeReturned' type='xs:string' use='required'/>
  2698. </xs:complexType>
  2699. </xs:element>
  2700. <xs:element name='error'>
  2701. <xs:complexType>
  2702. <xs:attribute name='message' type='xs:string' use='required'/>
  2703. </xs:complexType>
  2704. </xs:element>
  2705. </xs:choice>
  2706. <xs:attribute name='result' type='xs:boolean' use='required'/>
  2707. </xs:extension>
  2708. </xs:complexContent>
  2709. </xs:complexType>
  2710. <xs:element name='streamStart'>
  2711. <xs:complexType>
  2712. <xs:sequence>
  2713. <xs:element name='xmlns' minOccurs='0' maxOccurs='unbounded'>
  2714. <xs:complexType>
  2715. <xs:attribute name='prefix' type='xs:string' use='required'/>
  2716. <xs:attribute name='namespace' type='xs:string' use='required'/>
  2717. </xs:complexType>
  2718. </xs:element>
  2719. <xs:element ref='streams:features'
  2720. minOccurs='0'
  2721. maxOccurs='1'/>
  2722. <xs:any namespace='urn:ietf:params:xml:ns:xmpp-tls'
  2723. minOccurs='0'
  2724. maxOccurs='1'/>
  2725. <xs:any namespace='urn:ietf:params:xml:ns:xmpp-sasl'
  2726. minOccurs='0'
  2727. maxOccurs='1'/>
  2728. <xs:element ref='streams:error' minOccurs='0' maxOccurs='1'/>
  2729. </xs:sequence>
  2730. <xs:attribute name='from' type='xs:string' use='optional'/>
  2731. <xs:attribute name='id' type='xs:string' use='optional'/>
  2732. <xs:attribute name='to' type='xs:string' use='optional'/>
  2733. <xs:attribute name='version' type='xs:decimal' use='optional'/>
  2734. <xs:attribute ref='xml:lang' use='optional'/>
  2735. <xs:anyAttribute namespace='##other' processContents='lax'/>
  2736. </xs:complexType>
  2737. </xs:element>
  2738. <xs:element name='streamEnd'>
  2739. <xs:complexType/>
  2740. </xs:element>
  2741. </xs:schema>
  2742. ]]>
  2743. </code>
  2744. </section1>
  2745. <section1 topic='For more information' anchor='moreinfo'>
  2746. <p>
  2747. For more information, please see the following resources:
  2748. </p>
  2749. <ul>
  2750. <li>
  2751. <p>
  2752. The <link url='http://wiki.xmpp.org/web/Tech_pages/SensorNetworks'>Sensor Network section of the XMPP Wiki</link> contains further information about the
  2753. use of the sensor network XEPs, links to implementations, discussions, etc.
  2754. </p>
  2755. </li>
  2756. <li>
  2757. <p>
  2758. The XEP's and related projects are also available on <link url='https://github.com/joachimlindborg/'>github</link>, thanks to Joachim Lindborg.
  2759. </p>
  2760. </li>
  2761. <li>
  2762. <p>
  2763. A presentation giving an overview of all extensions related to Internet of Things can be found here:
  2764. <link url='http://prezi.com/esosntqhewhs/iot-xmpp/'>http://prezi.com/esosntqhewhs/iot-xmpp/</link>.
  2765. </p>
  2766. </li>
  2767. </ul>
  2768. </section1>
  2769. <section1 topic='Acknowledgements' anchor='ack'>
  2770. <p>Thanks to Joachim Lindborg, Takuki Kamiya, Tina Beckman, Karin Forsell, Jeff Freund and Rumen Kyusakov for all valuable feedback.</p>
  2771. </section1>
  2772. </xep>
  2773. <!-- please keep this to inform YD's editor (Emacs) work aligned with Peter's indent style
  2774. Local Variables:
  2775. nxml-child-indent: 4
  2776. sgml-indent-step: 4
  2777. End:
  2778. -->