99 lines
4.5 KiB

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<title>Application-Specific Error Conditions</title>
<abstract>This document defines a registry of application-specific error conditions.</abstract>
<spec>XMPP Core</spec>
<remark><p>Changed namespace from http://jabber.org/protocol/errors to urn:xmpp:errors.</p></remark>
<remark><p>Per a vote of the Jabber Council, advanced status to Active; also added example.</p></remark>
<remark><p>Added note about scope of registry.</p></remark>
<remark><p>Initial version.</p></remark>
<remark><p>First draft.</p></remark>
<section1 topic='Introduction' anchor='intro'>
<p>&xmppcore; specifies that an XMPP error stanza may include a child element qualified by an XML namespace other than 'urn:ietf:params:xml:ns:xmpp-stanzas'. This enables any XMPP protocol extension to define its own application-specific error conditions, such as the following:</p>
<example caption='An Application-Specific Error Condition (invalid-jid)'><![CDATA[
<iq type='error' from='pubsub.shakespeare.lit' to='francisco@denmark.lit/barracks' id='sub1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscribe node='blogs/princely_musings' jid='bernardo@denmark.lit'/>
<error type='modify'>
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<invalid-jid xmlns='http://jabber.org/protocol/pubsub#errors'/>
<p>Although the inclusion of application-specific error conditions introduces a great deal of flexibility, it may also lead to confusion regarding possible conditions. Therefore, this document defines a registry of application-specific error conditions, to be maintained by the &REGISTRAR;. In addition, this document registers a namespace of 'urn:xmpp:errors' as a fallback namespace for generalized error conditions that are not specific to a particular protocol (e.g., &lt;stanza-too-big/&gt; as a particular form of the &notacceptable; condition).</p>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Application-Specific Error Conditions Registry' anchor='registrar-conditions'>
<p>The XMPP Registrar maintains a registry of application-specific error conditions (see &APPERRORS;).</p>
<p>All application-specific error conditions that are defined in XMPP Extension Protocol specifications MUST be included in this registry. Application-specific error conditions that are defined outside of the XMPP Standards Foundation's standards process (see &xep0001;) MAY be included in this registry, but it is not required for them to be so registered.</p>
<section3 topic='Registration Process' anchor='registrar-conditions-process'>
<ns>the XML namespace that qualifies the condition</ns>
<element>the XML element of the error condition</element>
<desc>a natural-language description of the error condition</desc>
<doc>the document in which the condition is specified</doc>
<p>The registrant may register more than one condition at a time, each contained in a separate &lt;condition/&gt; element.</p>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; includes 'urn:xmpp:errors' in its registry of protocol namespaces.</p>
<section1 topic='Security Considerations' anchor='security'>
<p>This document introduces no known security vulnerabilities.</p>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>