1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-25 02:32:18 -05:00
This commit is contained in:
Peter Saint-Andre 2013-05-28 14:27:59 -06:00
parent 554db30c6c
commit ff983a5c7c

View File

@ -9,8 +9,8 @@
<title>JID Prep</title>
<abstract>This specification defines a way for an XMPP client to request an XMPP server to prep and normalize a given JID.</abstract>
&LEGALNOTICE;
<number>xxxx</number>
<status>ProtoXEP</status>
<number>0328</number>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies>
@ -18,7 +18,7 @@
<spec>XMPP IM</spec>
<spec>XEP-0030</spec>
</dependencies>
<supersedes />
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
<author>
@ -27,6 +27,12 @@
<email>lance@lance.im</email>
<jid>lance@lance.im</jid>
</author>
<revision>
<version>0.1</version>
<date>2013-05-28</date>
<initials>psa</initials>
<remark><p>Initial published version approved by the XMPP Council.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2013-05-21</date>
@ -45,7 +51,7 @@
<p>In some environments (in particular, browser based environments), a client does not have access to the various Unicode and internationalization libraries necessary to properly prep and normalize a JID. For those situations, this protocol defines a way for a client to ask a server to normalize a JID on its behalf.</p>
</section1>
<section1 topic='Discovering support' anchor='disco'>
<p>If a server supports JID prep queries, it MUST specify the 'urn:xmpp:jidprep:tmp' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.</p>
<p>If a server supports JID prep queries, it MUST specify the 'urn:xmpp:jidprep:0' feature in its service discovery information features as specified in &xep0030; and the Entity Capabilities profile specified in &xep0115;.</p>
<example caption='Client checks for support by the server'><![CDATA[
<iq type="get"
to="capulet.lit"
@ -60,11 +66,11 @@
id="info1">
<query xmlns="http://jabber.org/protocol/disco#info">
...
<feature var="urn:xmpp:jidprep:tmp"/>
<feature var="urn:xmpp:jidprep:0"/>
...
</query>
</iq>]]></example>
<p>The JID prep service MAY be supported through the use of an external component (&xep0114;); in which case, the component MUST return an identity of "component/jidprep" in addition to the "urn:xmpp:jidprep:tmp" feature.</p>
<p>The JID prep service MAY be supported through the use of an external component (&xep0114;); in which case, the component MUST return an identity of "component/jidprep" in addition to the "urn:xmpp:jidprep:0" feature.</p>
<example caption='Server component advertises support for JID prep queries'><![CDATA[
<iq type="result"
to="juliet@capulet.lit/balcony"
@ -73,26 +79,26 @@
<query xmlns="http://jabber.org/protocol/disco#info">
<identity category="component" type="jidprep" />
...
<feature var="urn:xmpp:jidprep:tmp" />
<feature var="urn:xmpp:jidprep:0" />
</query>
</iq>]]></example>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<p>In order to request prepping for a JID, the client sends an &IQ; stanza of type "get" to the server, containing a &lt;jid/&gt; element qualified by the 'urn:xmpp:jidprep:tmp' namespace and whose XML character data is the JID in question:</p>
<p>In order to request prepping for a JID, the client sends an &IQ; stanza of type "get" to the server, containing a &lt;jid/&gt; element qualified by the 'urn:xmpp:jidprep:0' namespace and whose XML character data is the JID in question:</p>
<example caption='Client requests the server to prep and normalize a JID'><![CDATA[
<iq type="get"
to="capulet.lit"
id="prep1">
<jid xmlns="urn:xmpp:jidprep:tmp">ROMeo@montague.lit/orchard</jid>
<jid xmlns="urn:xmpp:jidprep:0">ROMeo@montague.lit/orchard</jid>
</iq>
]]></example>
<p>The server MUST return either an IQ-result or an IQ-error. When returning an IQ-result, the server sends an &IQ; staza of type='result' containing a &lt;jid/&gt; element qualifed by the 'urn:xmpp:jidprep:tmp' namespace and whose XML character data MUST be the prepped and normalized version of the requested JID:</p>
<p>The server MUST return either an IQ-result or an IQ-error. When returning an IQ-result, the server sends an &IQ; staza of type='result' containing a &lt;jid/&gt; element qualifed by the 'urn:xmpp:jidprep:0' namespace and whose XML character data MUST be the prepped and normalized version of the requested JID:</p>
<example caption='Server responds with the prepped JID'><![CDATA[
<iq type="result"
to="juliet@capulet.lit/balcony"
from="capulet.lit"
id="prep1">
<jid xmlns="urn:xmpp:jidprep:tmp">romeo@montague.lit/orchard</jid>
<jid xmlns="urn:xmpp:jidprep:0">romeo@montague.lit/orchard</jid>
</iq>
]]></example>
<p>If an IQ-error is returned, then it SHOULD specify an error condition of &lt;jid-malformed/&gt; if the given JID could not be processed to a normalized form:</p>
@ -101,7 +107,7 @@
to="juliet@capulet.lit/balcony"
from="capulet.lit"
id="prep1">
<jid xmlns="urn:xmpp:jidprep:tmp">romeo@@montague.lit/orchard</jid>
<jid xmlns="urn:xmpp:jidprep:0">romeo@@montague.lit/orchard</jid>
<error type="modify">
<jid-malformed xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
</error>
@ -121,9 +127,9 @@
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'>
<p>The &REGISTRAR; includes 'urn:xmpp:jidprep:tmp' in its registry of protocol namespaces (see &NAMESPACES;).</p>
<p>The &REGISTRAR; includes 'urn:xmpp:jidprep:0' in its registry of protocol namespaces (see &NAMESPACES;).</p>
<ul>
<li>urn:xmpp:jidprep:tmp</li>
<li>urn:xmpp:jidprep:0</li>
</ul>
</section2>
<section2 topic='Protocol Versioning' anchor='registrar-versioning'>
@ -141,7 +147,7 @@
A server component that offers a JID prepping
and normalization service to constrained clients.
</desc>
<doc>XEP-XXXX</doc>
<doc>XEP-0328</doc>
</type>
</category>
]]></code>
@ -153,8 +159,8 @@
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:jidprep:tmp'
xmlns='urn:xmpp:jidprep:tmp'
targetNamespace='urn:xmpp:jidprep:0'
xmlns='urn:xmpp:jidprep:0'
elementFormDefault='qualified'>
<xs:annotation>