1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00

XEP-0322: Formatting and XML fixes

This commit is contained in:
Sam Whited 2016-11-02 15:10:35 -05:00
parent 34580b792f
commit 80883baece

View File

@ -13,8 +13,7 @@
<abstract>This specification describes how EXI compression can be used in XMPP networks.</abstract> <abstract>This specification describes how EXI compression can be used in XMPP networks.</abstract>
&LEGALNOTICE; &LEGALNOTICE;
<number>0322</number> <number>0322</number>
<status>Proposed</status> <status>Experimental</status>
<lastcall>2014-10-21</lastcall>
<type>Standards Track</type> <type>Standards Track</type>
<sig>Standards</sig> <sig>Standards</sig>
<approver>Council</approver> <approver>Council</approver>
@ -34,6 +33,14 @@
<jid>yusuke.doi@gmail.com</jid> <jid>yusuke.doi@gmail.com</jid>
<uri>http://www.linkedin.com/in/yusukedoi</uri> <uri>http://www.linkedin.com/in/yusukedoi</uri>
</author> </author>
<revision>
<version>0.5.1</version>
<date>2016-11-02</date>
<initials>ssw</initials>
<remark>
<p>Formatting and XML fixes.</p>
</remark>
</revision>
<revision> <revision>
<version>0.5</version> <version>0.5</version>
<date>2015-11-09</date> <date>2015-11-09</date>
@ -185,9 +192,8 @@
The following sections assume the client connects through the normal XMPP port, and starts communicating with the server using uncompressed XML fragments. The following sections assume the client connects through the normal XMPP port, and starts communicating with the server using uncompressed XML fragments.
When the client connects to the XMPP Server, it will receive a list of features supported by the server: When the client connects to the XMPP Server, it will receive a list of features supported by the server:
</p> </p>
<example caption='Search Features'> <example caption='Search Features'><![CDATA[
<![CDATA[ <stream:features>
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/> <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'> <compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method> <method>zlib</method>
@ -195,8 +201,7 @@
<method>exi</method> <method>exi</method>
<method>exi:54321</method> <method>exi:54321</method>
</compression> </compression>
</stream:features>]]> </stream:features>]]></example>
</example>
<p> <p>
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. 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.
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, 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,24 +219,21 @@
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 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
<strong>setup-failed</strong> response. <strong>setup-failed</strong> response.
</p> </p>
<example caption='Invalid setup'> <example caption='Invalid setup'><![CDATA[
<![CDATA[ <compress xmlns='http://jabber.org/protocol/compress'>
<compress xmlns='http://jabber.org/protocol/compress'>
<method>exi</method> <method>exi</method>
</compress> </compress>
<failure xmlns='http://jabber.org/protocol/compress'> <failure xmlns='http://jabber.org/protocol/compress'>
<setup-failed/> <setup-failed/>
</failure>]]> </failure>]]></example>
</example>
</section3> </section3>
<section3 topic='Proposing compression parameters' anchor='setup'> <section3 topic='Proposing compression parameters' anchor='setup'>
<p> <p>
When the client decides to activate EXI compression, it sends a <strong>setup</strong> stanza containing parameter proposals to the server as follows: When the client decides to activate EXI compression, it sends a <strong>setup</strong> stanza containing parameter proposals to the server as follows:
</p> </p>
<example caption='Proposing compression parameters'> <example caption='Proposing compression parameters'><![CDATA[
<![CDATA[ <setup xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true' blockSize='1024'
<setup xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true' blockSize='1024'
valueMaxLength='32' valuePartitionCapacity='100'> valueMaxLength='32' valuePartitionCapacity='100'>
<schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/> <schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/>
<schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/> <schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/>
@ -247,8 +249,7 @@
<schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/> <schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/>
<schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/> <schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/>
<schema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/> <schema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/>
</setup>]]> </setup>]]></example>
</example>
<p> <p>
<strong>Note:</strong> Schema files are identified using three properties: Its <strong>target namespace</strong>, its <strong>byte size</strong> and its <strong>Note:</strong> Schema files are identified using three properties: Its <strong>target namespace</strong>, its <strong>byte size</strong> and its
<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. <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.
@ -267,9 +268,8 @@
After receiving the request, the server responds with a <strong>setupResponse</strong> stanza containing the parameters it can accept, based After receiving the request, the server responds with a <strong>setupResponse</strong> stanza containing the parameters it can accept, based
on the initial values provided by the client. Any buffer sizes, etc., may have been changed, but only lowered, never raised. on the initial values provided by the client. Any buffer sizes, etc., may have been changed, but only lowered, never raised.
</p> </p>
<example caption='Unable to accommodate parameters'> <example caption='Unable to accommodate parameters'><![CDATA[
<![CDATA[ <setupResponse xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true'
<setupResponse xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true'
blockSize='1024' valueMaxLength='32' valuePartitionCapacity='100'> blockSize='1024' valueMaxLength='32' valuePartitionCapacity='100'>
<schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/> <schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/>
<schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/> <schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/>
@ -285,8 +285,7 @@
<schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/> <schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/>
<schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/> <schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/>
<missingSchema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/> <missingSchema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/>
</setupResponse>]]> </setupResponse>]]></example>
</example>
<p> <p>
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 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
normal <strong>schema</strong> element. normal <strong>schema</strong> element.
@ -306,19 +305,17 @@
<p> <p>
To upload a schema file, the client simply sends the schema file using an <strong>uploadSchema</strong> element, as follows: To upload a schema file, the client simply sends the schema file using an <strong>uploadSchema</strong> element, as follows:
</p> </p>
<example caption='Uploading schema file'> <example caption='Uploading schema file'><![CDATA[
<![CDATA[ <uploadSchema xmlns='http://jabber.org/protocol/compress/exi' contentType='Text'>
<uploadSchema xmlns='http://jabber.org/protocol/compress/exi' contentType='Text'>
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjx4czpzY2hlbWENCiAgICB4 PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjx4czpzY2hlbWENCiAgICB4
bWxuczp4cz0naHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEnDQogICAgdGFyZ2V0TmFt bWxuczp4cz0naHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEnDQogICAgdGFyZ2V0TmFt
ZXNwYWNlPSd1cm46eG1wcDpzbjpwcm92aXNpb25pbmcnDQogICAgeG1sbnM9J3Vybjp4bXBwOnNu ZXNwYWNlPSd1cm46eG1wcDpzbjpwcm92aXNpb25pbmcnDQogICAgeG1sbnM9J3Vybjp4bXBwOnNu
...
dmlsZWdlJz4NCgkJPHhzOmF0dHJpYnV0ZSBuYW1lPSdpZCcgdHlwZT0nUHJpdmlsZWdlSWQnIHVz dmlsZWdlJz4NCgkJPHhzOmF0dHJpYnV0ZSBuYW1lPSdpZCcgdHlwZT0nUHJpdmlsZWdlSWQnIHVz
ZT0ncmVxdWlyZWQnLz4NCgk8L3hzOmNvbXBsZXhUeXBlPg0KIA0KPC94czpzY2hlbWE+DQo= ZT0ncmVxdWlyZWQnLz4NCgk8L3hzOmNvbXBsZXhUeXBlPg0KIA0KPC94czpzY2hlbWE+DQo=
</uploadSchema>]]> </uploadSchema>]]></example>
</example>
<p> <p>
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 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
server then computes the <strong>target namespace</strong>, <strong>byte size</strong> and <strong>MD5 Hash</strong> from the sent schema file. server then computes the <strong>target namespace</strong>, <strong>byte size</strong> and <strong>MD5 Hash</strong> from the sent schema file.
@ -327,9 +324,8 @@
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 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
are accepted by the server. are accepted by the server.
</p> </p>
<example caption='Testing newly uploaded schema files'> <example caption='Testing newly uploaded schema files'><![CDATA[
<![CDATA[ <setup xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true' blockSize='1024'
<setup xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true' blockSize='1024'
valueMaxLength='32' valuePartitionCapacity='100'> valueMaxLength='32' valuePartitionCapacity='100'>
<schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/> <schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/>
<schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/> <schema ns='http://etherx.jabber.org/streams' bytes='3450' md5Hash='68719b98725477c46a70958d1ea7c781'/>
@ -345,14 +341,12 @@
<schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/> <schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/>
<schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/> <schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/>
<schema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/> <schema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/>
</setup>]]> </setup>]]></example>
</example>
<p> <p>
And the server should then respond: And the server should then respond:
</p> </p>
<example caption='Agreement between client and server'> <example caption='Agreement between client and server'><![CDATA[
<![CDATA[ <setupResponse xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true'
<setupResponse xmlns='http://jabber.org/protocol/compress/exi' version='1' strict='true'
blockSize='1024' valueMaxLength='32' valuePartitionCapacity='100' agreement='true' blockSize='1024' valueMaxLength='32' valuePartitionCapacity='100' agreement='true'
configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'> configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'>
<schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/> <schema ns='http://www.w3.org/XML/1998/namespace' bytes='4726' md5Hash='2e2cf9072dc058dcda41b7ee77a5cb54'/>
@ -369,8 +363,7 @@
<schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/> <schema ns='urn:xmpp:iot:sensordata' bytes='8092' md5Hash='49b101e7deea39ccc31340a3c7871c43'/>
<schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/> <schema ns='urn:xmpp:iot:interoperability' bytes='1275' md5Hash='5d39845a0082715ff8807691698353bb'/>
<missingSchema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/> <missingSchema ns='urn:xmpp:iot:provisioning' bytes='6303' md5Hash='3ed5360bc17eadb2a8949498c9af3f0c'/>
</setupResponse>]]> </setupResponse>]]></example>
</example>
<p> <p>
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. 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.
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 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
@ -475,10 +468,9 @@
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> 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>
command, as follows: command, as follows:
</p> </p>
<example caption='Downloading a new XML schema file on server'> <example caption='Downloading a new XML schema file on server'><![CDATA[
<![CDATA[ <downloadSchema xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd'/>
<downloadSchema xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd'/>]]> ]]></example>
</example>
<p> <p>
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> 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>
from the downloaded schema. from the downloaded schema.
@ -486,55 +478,44 @@
<p> <p>
When the schema has been downloaded, the following successful download response is returned: When the schema has been downloaded, the following successful download response is returned:
</p> </p>
<example caption='Schema successfully downloaded'> <example caption='Schema successfully downloaded'><![CDATA[
<![CDATA[ <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='true'/>
<downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='true'/>]]> ]]></example>
</example>
<p> <p>
If an HTTP error occurred while trying to download the schema, a response as follows is returned: If an HTTP error occurred while trying to download the schema, a response as follows is returned:
</p> </p>
<example caption='HTTP Error'> <example caption='HTTP Error'><![CDATA[
<![CDATA[ <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
<downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
<httpError code='404' message='NotFound'/> <httpError code='404' message='NotFound'/>
</downloadSchemaResponse>]]> </downloadSchemaResponse>]]></example>
</example>
<p> <p>
If the URL could not be resolved, the following response is returned: If the URL could not be resolved, the following response is returned:
</p> </p>
<example caption='Invalid URL'> <example caption='Invalid URL'><![CDATA[
<![CDATA[ <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='urk://example.org/schema.xsd' result='false'>
<downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='urk://example.org/schema.xsd' result='false'>
<invalidUrl message='Unrecognized schema.'/> <invalidUrl message='Unrecognized schema.'/>
</downloadSchemaResponse>]]> </downloadSchemaResponse>]]></example>
</example>
<p> <p>
If a timeout occurred during the download attempt, the following response is returned: If a timeout occurred during the download attempt, the following response is returned:
</p> </p>
<example caption='Timeout'> <example caption='Timeout'><![CDATA[
<![CDATA[ <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
<downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
<timeout message='No response returned.'/> <timeout message='No response returned.'/>
</downloadSchemaResponse>]]> </downloadSchemaResponse>]]></example>
</example>
<p> <p>
If the url points to something that is not a schema, the following response is returned: If the url points to something that is not a schema, the following response is returned:
</p> </p>
<example caption='Invalid Content Type'> <example caption='Invalid Content Type'><![CDATA[
<![CDATA[ <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
<downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
<invalidContentType contentTypeReturned='text/html'/> <invalidContentType contentTypeReturned='text/html'/>
</downloadSchemaResponse>]]> </downloadSchemaResponse>]]></example>
</example>
<p> <p>
If an error occurs that is unforeseen by this specification, the server can simply respond with a generic error message, as follows: If an error occurs that is unforeseen by this specification, the server can simply respond with a generic error message, as follows:
</p> </p>
<example caption='Other types of errors'> <example caption='Other types of errors'><![CDATA[
<![CDATA[ <downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
<downloadSchemaResponse xmlns='http://jabber.org/protocol/compress/exi' url='http://schemavault.example.org/compress/sn/provisioning.xsd' result='false'>
<error message='No free space left.'/> <error message='No free space left.'/>
</downloadSchemaResponse>]]> </downloadSchemaResponse>]]></example>
</example>
<p> <p>
<strong>Note:</strong> Downloading a schema, might download a version which does not correspond to the desired version <strong>Note:</strong> Downloading a schema, might download a version which does not correspond to the desired version
of the schema. It might for instance have been updated. This means the <strong>bytes</strong> and <strong>md5Hash</strong> values of the schema. It might for instance have been updated. This means the <strong>bytes</strong> and <strong>md5Hash</strong> values
@ -549,10 +530,9 @@
through the <strong>configurationId</strong> attribute. This Configuration ID can be used by the client during successive connections to the server, through the <strong>configurationId</strong> attribute. This Configuration ID can be used by the client during successive connections to the server,
to skip the larger part of the handshake, as is shown in the following example: to skip the larger part of the handshake, as is shown in the following example:
</p> </p>
<example caption='Accessing quick configurations'> <example caption='Accessing quick configurations'><![CDATA[
<![CDATA[ <setup xmlns='http://jabber.org/protocol/compress/exi' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>
<setup xmlns='http://jabber.org/protocol/compress/exi' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>]]> ]]></example>
</example>
<p> <p>
<strong>Note:</strong> the quick configuration includes all accepted schemas and all EXI options agreed upon during the <strong>Note:</strong> the quick configuration includes all accepted schemas and all EXI options agreed upon during the
session when the configuration ID was returned. The <strong>configurationId</strong> attribute MUST NOT be used together session when the configuration ID was returned. The <strong>configurationId</strong> attribute MUST NOT be used together
@ -561,10 +541,9 @@
<p> <p>
If the configuration is still available on the server, the server responds: If the configuration is still available on the server, the server responds:
</p> </p>
<example caption='Quick configuration accepted'> <example caption='Quick configuration accepted'><![CDATA[
<![CDATA[ <setupResponse xmlns='http://jabber.org/protocol/compress/exi' agreement='true' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>
<setupResponse xmlns='http://jabber.org/protocol/compress/exi' agreement='true' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>]]> ]]></example>
</example>
<p> <p>
Note that schemas or options are not mentioned explicitly when using this quick setup approach. Note that schemas or options are not mentioned explicitly when using this quick setup approach.
</p> </p>
@ -574,10 +553,9 @@
If the server for some reason does not remember the specific configuration requested by the client (the client might have been disconnected for If the server for some reason does not remember the specific configuration requested by the client (the client might have been disconnected for
a long time), it responds in the following manner: a long time), it responds in the following manner:
</p> </p>
<example caption='Quick configuration failure'> <example caption='Quick configuration failure'><![CDATA[
<![CDATA[ <setupResponse xmlns='http://jabber.org/protocol/compress/exi' agreement='false' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>
<setupResponse xmlns='http://jabber.org/protocol/compress/exi' agreement='false' configurationId='c76ab4ec-4993-4285-8c7a-098060581bb8'/>]]> ]]></example>
</example>
<p> <p>
The agreement attribute is optional, with a default value of false. So, if the attribute is omitted, the client must consider the The agreement attribute is optional, with a default value of false. So, if the attribute is omitted, the client must consider the
agreement to be nonexistent. When no agreement is reached using the quick configuration approach, the client must restart the handshake agreement to be nonexistent. When no agreement is reached using the quick configuration approach, the client must restart the handshake
@ -589,19 +567,16 @@
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> 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>
stanza, as follows: stanza, as follows:
</p> </p>
<example> <example><![CDATA[
<![CDATA[ <compress xmlns='http://jabber.org/protocol/compress'>
<compress xmlns='http://jabber.org/protocol/compress'>
<method>exi</method> <method>exi</method>
</compress>]]> </compress>]]></example>
</example>
<p> <p>
The server now has the necessary knowledge on how the EXI engine should be configured for the current session and it responds as follows: The server now has the necessary knowledge on how the EXI engine should be configured for the current session and it responds as follows:
</p> </p>
<example caption='Compression accepted'> <example caption='Compression accepted'><![CDATA[
<![CDATA[ <compressed xmlns='http://jabber.org/protocol/compress'/>
<compressed xmlns='http://jabber.org/protocol/compress'/>]]> ]]></example>
</example>
<p> <p>
When the client receives acknowledgement that the compression method has been accepted, it restarts the stream, as explained in When the client receives acknowledgement that the compression method has been accepted, it restarts the stream, as explained in
<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> <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>
@ -628,7 +603,7 @@
</p> </p>
<example caption='Start of EXI-compressed stream'> <example caption='Start of EXI-compressed stream'>
<![CDATA[ <![CDATA[
<exi:streamStart from='client@im.example.org' <exi:streamStart from='client@im.example.org'
to='im.example.org' to='im.example.org'
version='1.0' version='1.0'
xml:lang='en' xml:lang='en'
@ -636,7 +611,7 @@
<exi:xmlns prefix='' namespace='jabber:client'/> <exi:xmlns prefix='' namespace='jabber:client'/>
<exi:xmlns prefix='streams' namespace='http://etherx.jabber.org/streams'/> <exi:xmlns prefix='streams' namespace='http://etherx.jabber.org/streams'/>
<exi:xmlns prefix='exi' namespace='http://jabber.org/protocol/compress/exi'/> <exi:xmlns prefix='exi' namespace='http://jabber.org/protocol/compress/exi'/>
</exi:streamStart>]]> </exi:streamStart>]]>
</example> </example>
<p> <p>
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 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
@ -652,7 +627,7 @@
</p> </p>
<example caption='End of EXI-compressed stream'> <example caption='End of EXI-compressed stream'>
<![CDATA[ <![CDATA[
<exi:streamEnd xmlns:exi='http://jabber.org/protocol/compress/exi'/>]]> <exi:streamEnd xmlns:exi='http://jabber.org/protocol/compress/exi'/>]]>
</example> </example>
</section3> </section3>
</section2> </section2>
@ -756,7 +731,7 @@
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. 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.
</p> </p>
<p> <p>
For example, the client want to use MUC option (<link href="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. 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.
</p> </p>
<example caption="XML equivalent of setup element (Client to Server)"> <example caption="XML equivalent of setup element (Client to Server)">
<!-- samples/C2S/002-base-setup.xml --> <!-- samples/C2S/002-base-setup.xml -->
@ -941,7 +916,7 @@
<schemaId>c:761aabc0-a255-4b9b-89a1-4cb859559691</schemaId> <schemaId>c:761aabc0-a255-4b9b-89a1-4cb859559691</schemaId>
</common> </common>
</header> </header>
]]> ]]>
</example> </example>
<example caption="XML Equivalent of streamStart"> <example caption="XML Equivalent of streamStart">
<!-- samples/C2S/010-base+muc-restart.xml --> <!-- samples/C2S/010-base+muc-restart.xml -->
@ -952,7 +927,7 @@
<exi:xmlns prefix="" namespace="jabber:client" /> <exi:xmlns prefix="" namespace="jabber:client" />
<exi:xmlns prefix="xml" namespace="http://www.w3.org/XML/1998/namespace" /> <exi:xmlns prefix="xml" namespace="http://www.w3.org/XML/1998/namespace" />
</exi:streamStart> </exi:streamStart>
]]> ]]>
</example> </example>
<!-- <!--
<example caption="Actual EXI Stream with EXI option document"> <example caption="Actual EXI Stream with EXI option document">
@ -974,7 +949,7 @@ FIXME: needs some development
<schemaId>c:761aabc0-a255-4b9b-89a1-4cb859559691</schemaId> <schemaId>c:761aabc0-a255-4b9b-89a1-4cb859559691</schemaId>
</common> </common>
</header> </header>
]]> ]]>
</example> </example>
<example caption="XML Equivalent of streamStart in response"> <example caption="XML Equivalent of streamStart in response">
<!-- samples/S2C/010-base+muc-restart.xml --> <!-- samples/S2C/010-base+muc-restart.xml -->
@ -999,7 +974,7 @@ FIXME: needs some development
<![CDATA[ <![CDATA[
<?xml version="1.0"?> <?xml version="1.0"?>
<streamEnd xmlns='http://jabber.org/protocol/compress/exi' /> <streamEnd xmlns='http://jabber.org/protocol/compress/exi' />
]]> ]]>
</example> </example>
<!-- <!--
<example caption="Actual EXI Stream with EXI option document"> <example caption="Actual EXI Stream with EXI option document">
@ -1063,7 +1038,7 @@ FIXME
--> -->
<p> <p>
In addition, local value learning mechanism is disabled by In addition, local value learning mechanism is disabled by
default as described in section 4 of <link href="http://www.w3.org/TR/exi-profile/">EXI Profile</link>. default as described in section 4 of <link url="https://www.w3.org/TR/exi-profile/">EXI Profile</link>.
<!-- FIXME: [YD] add reference to available implementations --> <!-- FIXME: [YD] add reference to available implementations -->
</p> </p>
<ul> <ul>
@ -1105,8 +1080,7 @@ FIXME
| | | <-[Proc]-[EXI]<------- EXI Channel ------>[EXI]-[Proc]-> | | | | | | <-[Proc]-[EXI]<------- EXI Channel ------>[EXI]-[Proc]-> | | |
| +----+ | | +----+ | | +----+ | | +----+ |
+-------------------------+ +-----------------------+ +-------------------------+ +-----------------------+
]]> ]]>
</example> </example>
<p> <p>
In the example, the box XMPP is conventional XMPP process. [EXI] represents EXI processor (encoder and decoder). [Proc] means preprocessor and postprocessor. In the example, the box XMPP is conventional XMPP process. [EXI] represents EXI processor (encoder and decoder). [Proc] means preprocessor and postprocessor.
@ -1366,7 +1340,7 @@ FIXME
The format for these opton documents or locations is beyond the scope of this specification. The format for these opton documents or locations is beyond the scope of this specification.
</p> </p>
<section3 topic="Shortcut Setup for Alternative Transport Binding" anchor="shortcutAltBind"> <section3 topic="Shortcut Setup for Alternative Transport Binding" anchor="shortcutAltBind">
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>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>
<ul> <ul>
<li> <li>
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. 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.
@ -2395,7 +2369,7 @@ FIXME
new byte sizes and hash values must be computed for the changed schema correspondingly. new byte sizes and hash values must be computed for the changed schema correspondingly.
</p> </p>
<p> <p>
Patched version of XML schemas may be placed in the <link href="#wellknown">snapshot repository for well-known schemas</link> to avoid wild patches (and too many derived schema for the same model). 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).
</p> </p>
<section3 topic="Patch to avoid UPA for streams.xsd" anchor="patch"> <section3 topic="Patch to avoid UPA for streams.xsd" anchor="patch">
<!-- [YD] --> <!-- [YD] -->
@ -2478,16 +2452,16 @@ FIXME
]]> ]]>
</code> </code>
<p> <p>
The ${snapshot-url} corresponds to yet-to-be-specified schema snapshot repository described in <link href="#wellknown">snapshot repository for well-known schemas</link> section. 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.
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. 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.
</p> </p>
</section2> </section2>
<section2 topic="Reserved Schema IDs" anchor="reservedSchemaID"> <section2 topic="Reserved Schema IDs" anchor="reservedSchemaID">
<!-- [YD] required for alternative bindings --> <!-- [YD] required for alternative bindings -->
Following schema Ids are reserved. <p>Following schema Ids are reserved.</p>
<ul> <ul>
<li> <li>
Schema IDs starts with "c:". This is used as <link href="#shortcutaltBind">shortcut setup for alternative transport binding</link>. Schema IDs starts with "c:". This is used as <link url="#shortcutaltBind">shortcut setup for alternative transport binding</link>.
</li> </li>
<li>Schema IDs starts with "urn:xmpp". This may be used to describe XEP-based schemas.</li> <li>Schema IDs starts with "urn:xmpp". This may be used to describe XEP-based schemas.</li>
</ul> </ul>