1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-28 12:12:22 -05:00

editorial review

git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1808 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-04-28 16:46:43 +00:00
parent 28ed02a47b
commit 3eaf8220a5

View File

@ -62,7 +62,7 @@
<section1 topic='Format' anchor='format'> <section1 topic='Format' anchor='format'>
<p>The format for including binary data is straightforward: the data is encapsulated as the XML character data of a &lt;data/&gt; element, where the data MUST be encoded as Base64 in accordance with Section 4 of &rfc4648; (note: the Base64 output MUST NOT include whitespace and MUST set the number of pad bits to zero).</p> <p>The format for including binary data is straightforward: the data is encapsulated as the XML character data of a &lt;data/&gt; element, where the data MUST be encoded as Base64 in accordance with Section 4 of &rfc4648; (note: the Base64 output MUST NOT include whitespace and MUST set the number of pad bits to zero).</p>
<p>The &lt;data/&gt; element SHOULD be used only to encapsulate small bits of binary data and SHOULD NOT be used for large data transfers. Naturally the definition of "small" and "large" is rather loose. In general, it is recommended that the data should not be more than 4 kilobytes and that dedicated file transfer methods should be used for exchanging blobs of data larger than 4 kilobytes. Naturally, implementations or deployments may impose their own limits.</p> <p>The &lt;data/&gt; element SHOULD be used only to encapsulate small bits of binary data and SHOULD NOT be used for large data transfers. Naturally the definitions of "small" and "large" are rather loose. In general, it is recommended that the data should not be more than 8 kilobytes and that dedicated file transfer methods should be used for exchanging blobs of data larger than 8 kilobytes. Naturally, implementations or deployments may impose their own limits.</p>
<p>The following attributes are defined for the &lt;data/&gt; element.</p> <p>The following attributes are defined for the &lt;data/&gt; element.</p>
<table caption='Defined Attributes'> <table caption='Defined Attributes'>
<tr> <tr>
@ -187,12 +187,18 @@
</section2> </section2>
<section2 topic='Data Form' anchor='form'> <section2 topic='Data Form' anchor='form'>
<p>&xep0221; describes how to include a media element in &xep0004;, e.g. for the purpose of placing a human-viewable "CAPTCHA" in a form that is used for &xep0158; or &xep0077;. The &lt;media/&gt; element described in <cite>XEP-0221</cite> contains one or more &lt;uri/&gt; elements (which point to locations where the media can be downloaded, e.g. via HTTP) as well as a &lt;data/&gt; element that includes the data itself. The proposed &lt;media/&gt; element could be redefined to contain a &lt;data/&gt; element as described herein and shown in the following example.</p> <p>&xep0221; describes how to include a media element in &xep0004;, e.g. for the purpose of placing a human-viewable "CAPTCHA" in a form that is used for &xep0158; or &xep0077;. The &lt;media/&gt; element described in <cite>XEP-0221</cite> contains one or more &lt;uri/&gt; elements (which point to locations where the media can be downloaded, e.g. via HTTP) as well as a &lt;data/&gt; element that includes the data itself. The &lt;media/&gt; element would contain a &lt;data/&gt; element as described herein and shown in the following example.</p>
<example caption='Audio Media Element'><![CDATA[ <example caption='Audio Media Element'><![CDATA[
<media xmlns='http://www.xmpp.org/extensions/xep-0221.html#ns'> <media xmlns='urn:xmpp:tmp:media-element'>
<uri type='audio/x-wav'>http://victim.example.com/challenges/speech.wav?F3A6292C</uri> <uri type='audio/x-wav'>
<uri type='audio/ogg-speex'>http://victim.example.com/challenges/speech.ogg?F3A6292C</uri> http://victim.example.com/challenges/speech.wav?F3A6292C
<uri type='audio/mpeg'>http://victim.example.com/challenges/speech.mp3?F3A6292C</uri> </uri>
<uri type='audio/ogg-speex'>
http://victim.example.com/challenges/speech.ogg?F3A6292C
</uri>
<uri type='audio/mpeg'>
http://victim.example.com/challenges/speech.mp3?F3A6292C
</uri>
<data xmlns='urn:xmpp:tmp:data-element' <data xmlns='urn:xmpp:tmp:data-element'
alt='An audio file' alt='An audio file'
type='audio/x-wav'> type='audio/x-wav'>
@ -200,11 +206,11 @@
</data> </data>
</media> </media>
]]></example> ]]></example>
<p>The media could then be included in a data form.</p> <p>The media would then be included in a data form as illustrated in <cite>XEP-0221</cite>.</p>
</section2> </section2>
<section2 topic='File Transfer Preview' anchor='preview'> <section2 topic='File Transfer Preview' anchor='preview'>
<p>A previous proposal <note>See &lt;<link url='http://www.xmpp.org/extensions/inbox/file-preview.html'>http://www.xmpp.org/extensions/inbox/file-preview.html</link>&gt;.</note> described a method for including a thumbnail or file preview in a file transfer request. Such a preview can be included using the &lt;data/&gt; element, as shown below. However, a preview SHOULD not be included unless the receiving entity advertises (via &xep0030; or &xep0115;) support for the "urn:xmpp:tmp:file-preview" service discovery feature &NSNOTE;.</p> <p>A previous proposal <note>See &lt;<link url='http://www.xmpp.org/extensions/inbox/file-preview.html'>http://www.xmpp.org/extensions/inbox/file-preview.html</link>&gt;.</note> described a method for including a thumbnail or file preview in a file transfer request. Such a preview can be included using the &lt;data/&gt; element, as shown below. However, a preview SHOULD NOT be included unless the receiving entity advertises (via &xep0030; or &xep0115;) support for the "urn:xmpp:tmp:file-preview" service discovery feature &NSNOTE;.</p>
<example caption='File transfer offer with preview'><![CDATA[ <example caption='File transfer offer with preview'><![CDATA[
<iq from='romeo@montague.lit/home' <iq from='romeo@montague.lit/home'
id='offer1' id='offer1'