XEP-0363: Fix invalid XML in examples (tps)

Squashed commit of the following:

commit 923ffe878f2f8dcca56d1c5e8243539de1397f73
Author: Thijs Alkemade <me@thijsalkema.de>
Date:   Fri Dec 11 20:04:23 2015 +0100

    XEP-0363: Added missing `type`

commit 0e68bd49d8beaee7993a56b128762d6d2ca34c8a
Author: Thijs Alkemade <me@thijsalkema.de>
Date:   Fri Dec 11 18:18:45 2015 +0100

    XEP-0363: Fix XML in the examples
This commit is contained in:
Sam Whited 2016-01-05 10:56:00 -06:00
parent 5d32c0be03
commit 93724e9aca
1 changed files with 22 additions and 15 deletions

View File

@ -28,6 +28,12 @@
<email>daniel@gultsch.de</email>
<jid>daniel@gultsch.de</jid>
</author>
<revision>
<version>0.1.1</version>
<date>2016-01-05</date>
<initials>XEP Editor (ssw)</initials>
<remark><p>Fix invalid XML in examples (tpa).</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2015-08-27</date>
@ -66,20 +72,21 @@
<iq from='montague.tld'
id='step_01'
to='romeo@montague.tld/garden'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='upload.montague.tld' name='HTTP File Upload' />
<item jid='conference.montague.tld' name='Chatroom Service' />
</query>
</iq>]]></example>
<example caption='Client sends service discorvey request to upload service'><![CDATA[
<iq from='romeo@montague.tld/garden
<iq from='romeo@montague.tld/garden'
id='step_02'
to='upload.montague.tld'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>]]></example>
<example caption='Upload service replies to service discovery request'><![CDATA[
<iq from='upload.montague.tld
<iq from='upload.montague.tld'
id='step_02'
to='romeo@montague.tld/garden'
type='result'>
@ -95,11 +102,11 @@
<p>A client requests a new upload slot by sending an IQ-get to the upload service containing a &lt;request&gt; child element qualified by the urn:xmpp:http:upload namespace. This element MUST include elements &lt;filename&gt; and &lt;size&gt; containing the file name and size respectively.</p>
<p>An additional element &lt;content-type&gt; containing the Content-Type is OPTIONAL.</p>
<example caption='Client requests a slot on the upload service'><![CDATA[
<iq from='romeo@montague.tld/garden
<iq from='romeo@montague.tld/garden'
id='step_03'
to='upload.montague.tld'
type='get'>
<request 'urn:xmpp:http:upload'>
<request xmlns='urn:xmpp:http:upload'>
<filename>my_juliet.png</filename>
<size>23456</size>
<content-type>image/jpeg</content-type>
@ -107,9 +114,9 @@
</iq>]]></example>
<p>The upload service responds with both a PUT and a GET URL wrapped by a &lt;slot&gt; element. The service SHOULD keep the file name and especially the file ending intact. Using the same hostname for PUT and GET is OPTIONAL. The host SHOULD provide Transport Layer Security.</p>
<example caption='The upload service responsd with a slot'><![CDATA[
<iq from='upload.montague.tld
<iq from='upload.montague.tld'
id='step_03'
to='romeo@montague.tld/garden
to='romeo@montague.tld/garden'
type='result'>
<slot xmlns='urn:xmpp:http:upload'>
<put>https://upload.montague.tld/4a771ac1-f0b2-4a4a-9700-f2a26fa2bb67/my_juliet.png</put>
@ -120,11 +127,11 @@
<section1 topic='Error conditions' anchor='errors'>
<p>Instead of providing the client with a slot the service MAY respond with an error if the requested file size is too large.</p>
<example caption='Alternative response by the upload service if the file size was too large'><![CDATA[
<iq from='upload.montague.tld
<iq from='upload.montague.tld'
id='step_03'
to='romeo@montague.tld/garden
to='romeo@montague.tld/garden'
type='error'>
<request 'urn:xmpp:http:upload>
<request xmlns='urn:xmpp:http:upload'>
<filename>my_juliet.png</filename>
<size>23456</size>
</request>
@ -138,11 +145,11 @@
</iq>]]></example>
<p>For any other type of error the service SHOULD respond with appropriate error types to indicate temporary or permanent errors.</p>
<example caption='Alternative response by the upload service to indicate a temporary error after the client exceeded a quota'><![CDATA[
<iq from='upload.montague.tld
<iq from='upload.montague.tld'
id='step_03'
to='romeo@montague.tld/garden
to='romeo@montague.tld/garden'
type='error'>
<request 'urn:xmpp:http:upload>
<request xmlns='urn:xmpp:http:upload'>
<filename>my_juliet.png</filename>
<size>23456</size>
</request>
@ -152,11 +159,11 @@
</error>
</iq>]]></example>
<example caption='Alternative response by the upload service to indicate a permanent error to a client that is not allowed to upload files'><![CDATA[
<iq from='upload.montague.tld
<iq from='upload.montague.tld'
id='step_03'
to='romeo@montague.tld/garden
to='romeo@montague.tld/garden'
type='error'>
<request 'urn:xmpp:http:upload>
<request xmlns='urn:xmpp:http:upload'>
<filename>my_juliet.png</filename>
<size>23456</size>
</request>