mirror of
https://github.com/moparisthebest/xeps
synced 2024-10-31 15:35:07 -04:00
ef894946ff
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1925 4b5297f7-1745-476d-ba37-a9c6900126ab
249 lines
28 KiB
XML
249 lines
28 KiB
XML
<?xml version='1.0' encoding='UTF-8'?>
|
|
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
|
<!ENTITY % ents SYSTEM 'xep.ent'>
|
|
%ents;
|
|
]>
|
|
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
|
<xep>
|
|
<header>
|
|
<title>Guidelines for Authors of XMPP Extension Protocols</title>
|
|
<abstract>This document provides information intended to assist authors of XMPP Extension Protocols.</abstract>
|
|
&LEGALNOTICE;
|
|
<number>0143</number>
|
|
<status>Active</status>
|
|
<type>Procedural</type>
|
|
<sig>Standards</sig>
|
|
<approver>Council</approver>
|
|
<dependencies>
|
|
<spec>XEP-0001</spec>
|
|
</dependencies>
|
|
<supersedes/>
|
|
<supersededby/>
|
|
<shortname>N/A</shortname>
|
|
&stpeter;
|
|
<revision>
|
|
<version>1.0</version>
|
|
<date>2004-12-09</date>
|
|
<initials>psa</initials>
|
|
<remark><p>Per a vote of the XMPP Council, advanced status to Active.</p></remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.4</version>
|
|
<date>2004-10-22</date>
|
|
<initials>psa</initials>
|
|
<remark><p>Further clarifications.</p></remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.3</version>
|
|
<date>2004-10-12</date>
|
|
<initials>psa</initials>
|
|
<remark><p>Minor clarifications throughout.</p></remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.2</version>
|
|
<date>2004-09-16</date>
|
|
<initials>psa</initials>
|
|
<remark><p>Described document metadata elements.</p></remark>
|
|
</revision>
|
|
<revision>
|
|
<version>0.1</version>
|
|
<date>2004-09-15</date>
|
|
<initials>psa</initials>
|
|
<remark><p>Initial version.</p></remark>
|
|
</revision>
|
|
</header>
|
|
<section1 topic='Introduction' anchor='intro'>
|
|
<p>The &XSF; receives a significant number of proposals for defining extensions to the core XMPP protocols specified in &xmppcore;. However, it is not always clear to authors how to best structure a proposal in order for it to be accepted as an XMPP Extension Protocol (XEP) and then advance through the XSF's standards process. Therefore, this document provides guidelines that are intended to help authors write better XMPP Extension Protocol specifications.</p>
|
|
<p>These guidelines assume that the reader is familiar with the XEP series of documents and the processes for handling them within the XSF, as defined in &xep0001;.</p>
|
|
</section1>
|
|
<section1 topic='Preparation' anchor='prep'>
|
|
<p>The prospective author is strongly encouraged to complete some research before submitting a proposal for consideration as an XMPP Extension Protocol. In particular, the author should do the following:</p>
|
|
<ul>
|
|
<li>Review the XMPP RFCs and experimental or approved XMPP Extension Protocols to determine if the proposed protocol extension is truly needed in order to fill a gap in existing Jabber/XMPP technologies and protocols.</li>
|
|
<li>Review rejected and deferred XMPP Extension Protocol specifications to determine if similar extensions have been proposed in the past but not approved by the &COUNCIL;.</li>
|
|
<li>Review protocols developed within other standards development organizations, such as the &IETF; and &W3C;, to determine if they might be more appropriate than a new XMPP extension.</li>
|
|
<li>Review discussions within the &SSIG; to determine if similar functionality has been discussed in the past or is currently under discussion.</li>
|
|
</ul>
|
|
<p>After completing this research, the prospective author may conclude that a new protocol extension is needed. If so, the author is strongly advised to do the following:</p>
|
|
<ol>
|
|
<li>Review XEP-0001 and the &xep0134;.</li>
|
|
<li>Understand the <link url='#submit'>Submission Process</link>.</li>
|
|
<li>Become familiar with the <link url='#format'>XEP XML Format</link>.</li>
|
|
<li>Then and only then write a proposal that includes all of the appropriate <link url='#sections'>Sections of a XEP</link>.</li>
|
|
<li>Review the content to ensure that it conforms to the <link url='#styleguide'>XEP Styleguide</link>.</li>
|
|
</ol>
|
|
</section1>
|
|
<section1 topic='Submission Process' anchor='submit'>
|
|
<p>The process for submitting a proposal for consideration as an XMPP Extension Protocol is straightforward:</p>
|
|
<ol>
|
|
<li>Contact the &EDITOR; so that he knows to expect your submission.</li>
|
|
<li>Write your proposal following the guidelines described herein.</li>
|
|
<li>Make sure that you read, understand, and agree to the &XSFIPR; before you submit your proposal.</li>
|
|
<li>Send your XML file (or a URL for the file) to the XMPP Extensions Editor.</li>
|
|
</ol>
|
|
</section1>
|
|
<section1 topic='XEP XML Format' anchor='format'>
|
|
<p>The XEP XML format is substantially similar to a reduced set of XHTML. This is intentional: it makes authoring XMPP Extension Protocol specifications easier. In fact, if you use the template file with its associated XSLT stylesheet, you should be able to view your proposal in most modern web browsers (see below). The following subsections explain how to get started with XEP authoring and describe the XML format used for XMPP Extension Protocols (see the xep.xsd or xep.dtd file for a formal description).</p>
|
|
<section2 topic='Working With XEP Files' anchor='format-work'>
|
|
<p>The best way to start working on your proposal is to retrieve all of the existing XMPP Extension Protocol specifications and associated stylesheets from source control. These files are stored using Subsversion (SVN), in a module labelled 'xmpp' and subdirectory labelled 'extensions' at xmpp.org. Instructions for accessing these files are provided at <<link url='http://www.xmpp.org/xsf/sourcecontrol.shtml'>http://www.xmpp.org/xsf/sourcecontrol.shtml</link>>. The document structure is formally defined by both a DTD and an XML schema, but you do not need to understand the formal descriptions in order to author an XMPP Extension Protocol. In addition, a handy template file is included as the 'xep-template.xml' file in the 'extensions' directory, providing a quick starting point for XEP authoring.</p>
|
|
<p>To create your proposal, do an SVN checkout of the 'xmpp' module, change directories to the 'trunk/extensions/' directory, copy the template file (e.g., 'cp xep-template.xml xep-foo.xml'), and start editing the file using either a basic text editor or a specialized XML editing application such as XML Spy or XMLmind.</p>
|
|
<p>Even if you use a basic text editor, you should be able to view your document in most modern web browsers as an XML file as long as you have xep.xsl and xep.dtd in the 'extensions/' directory. Because of inconsistencies in browser XSLT implementations, certain formatting (e.g., table layouts and the numbering of tables, examples, and footnotes) may not be perfect. Don't panic; it will look fine in the HTML output produced by the XMPP Extensions Editor. If your XML file doesn't render at all (i.e., it's just one big text blob), you are using a bad browser. If you see only the bare outline generated by xep.xsl but none of your text, you have an error in your XML. You can check your XML syntax at xml.com <note><<link url="http://www.xml.com/pub/a/tools/ruwf/check.html">http://www.xml.com/pub/a/tools/ruwf/check.html</link>></note>.</p>
|
|
<p>To programatically convert your XML file into HTML, we recommend using Daniel Veillard's <link url='http://xmlsoft.org/XSLT/'>xsltproc</link> program, which will give you helpful error messages regarding XML syntax problems. However, the XMPP Extensions Editor will do the final rendering of XML into HTML as well as posting of your HTML file to www.xmpp.org, so you do not need to generate HTML files for submission to the XMPP Extensions Editor (in fact, the XMPP Extensions Editor requires that you submit your proposal in the XEP XML format, not HTML).</p>
|
|
<p>Finally, the xep.ent file contains convenient "external entities" that provide shortcuts for including references to XMPP Extension Protocols, RFCs, and other common strings. Unfortunately, most browsers do not correctly process external entities, so you cannot include entities from xep.ent if you need to view your XML source file in a browser. However, the XMPP Extensions Editor reserves the right to convert your markup to external entities, since it makes his life easier. Also, please do not add items to the xep.ent file; instead, ask the XMPP Extensions Editor to add them for you.</p>
|
|
</section2>
|
|
<section2 topic='File Metadata' anchor='format-metadata'>
|
|
<p>This section describes the metadata elements contained in the <header/> element of a XEP file (see below for the file contents).</p>
|
|
<p>The XML character data of the <title/> element is the title of your XEP. Choose a descriptive title that is less than five words long. The XMPP Extensions Editor may change this in consultation with the author.</p>
|
|
<p>The XML character data of the <abstract/> element SHOULD be one sentence that captures the essence of your proposal (usually beginning "This specification defines an XMPP protocol extension that..."). The XMPP Extensions Editor has been known to modify the abstract so that it accurately describes the proposal.</p>
|
|
<p>The XML character data of the <legal/> element MUST be as defined in the XSF IPR Policy and reflected in both the xep.ent file and the XEP template.</p>
|
|
<p>The XML character data of the <number/> element SHOULD be "xxxx"; this will be changed to the next sequential XEP number by the XMPP Extensions Editor if the XMPP Council accepts the proposal as an XMPP Extension Protocol.</p>
|
|
<p>The XML character data of the <status/> element SHOULD be "ProtoXEP" since all proposals start out as "proto-XEPs"; this will be changed to "Experimental" if the XMPP Council accepts the proposal as an XMPP Extension Protocol.</p>
|
|
<p>The XML character data of the <type/> element SHOULD be either "Standards Track" or "Informational" (there are also Historical, Humorous, and Procedural XEPs, but these are uncommon and usually written by the XMPP Extensions Editor). A Standards Track XEP defines an XMPP extension intended to be used as a common part of Jabber/XMPP technologies. An Informational XEP defines best practices or a usage profile related to XMPP or an XMPP Extension Protocol (e.g., &xep0175;).</p>
|
|
<p>The XML character data of the <approver/> element SHOULD be "Council".</p>
|
|
<p>The <dependencies/> element is used to specify RFCs, XMPP Extension Protocols, and other specifications on which your proposal depends in a normative fashion (i.e., specifications that MUST or SHOULD be understood in order to implement your proposed protocol). Each specification MUST be identified by a distinct <spec/> child element (see existing XEP specifications for clues regarding document identifiers, or consult with the XMPP Extensions Editor).</p>
|
|
<p>The <supersedes/>, <supersededby/>, <shortname/>, and <schemaloc/> elements are for use by the XMPP Extensions Editor; however, if your document supersedes an existing XMPP Extension Protocol, feel free to include a <spec/> child element specifying the document identifier (e.g., XEP-0093) for the protocol that is being superseded.</p>
|
|
<p>Include one <author/> element for each co-author. Note well that the <firstname/> and <surname/> elements are REQUIRED per XEP-0001, as is some combination of the <email/>, <jid/>, and <uri/> elements so that appropriate contact information is available.</p>
|
|
<p>Include one <revision/> element for each revision of your document. The XML character data of the <version/> element SHOULD be "0.0.1" for your initial submission to the XMPP Extensions Editor, and the <remark/> SHOULD be "First draft."; for each revision, you will include another <revision/> element (place it <em>before</em> the existing <revision/> elements) and iterate the <version/> element (e.g., "0.0.2" after "0.0.1" or "0.7" after "0.6"). The format for the <date/> element is yyyy-mm-dd. Please do not include the characters ' or " in your revision remarks.</p>
|
|
</section2>
|
|
<section2 topic='File Contents' anchor='format-contents'>
|
|
<p>Aside from the metadata in the <header/> element (see above), a XEP file is a series of sections, arranged in a hierarchy (<section1/> is a top-level section, within which you can nest <section2/> sections, and so on down to <section4/>). The title of a section is captured in the 'topic' attribute. You should also include an 'anchor' attribute so that you can link to page fragments from within your document. The allowable elements within a section element probably look familiar from XHTML: <p/> for paragraphs, <ol/> and <ul/> for ordered and unordered lists, and so on.</p>
|
|
<p>The <example/> and <code/> elements are used to show protocol snippets; the <example/> element SHOULD possess a 'caption' attribute that describes the example, whereas the <code/> element does not. Define an XML CDATA section within both of these elements so that you do not need to escape the '<' and '>' characters in your sample XML stanzas, since this makes life much easier for author and editor alike (see the markup in existing XEP specifications).</p>
|
|
<p>The <p/> and <li/> elements can also contain more markup that is familiar from XHTML, such as the <img/> element. Note that hyperlinks are of the form <link url='foo'>bar</link> rather than <a href='foo'>bar</a>; the reasons for this are lost in the mists of time and it is too late to change it now, so you'll just have to adjust. If needed, you can also use inline structural and presentational markup such as <em/>, <strong/>, <tt/>, <cite/>, and <span/> within the <p/> and <li/> elements. </p>
|
|
<p>You may also include tables (these are helpful for listing error codes and such). The <table/> element SHOULD possess a 'caption' attribute that describes the table's contents. Standard XHTML table structure applies (<tr/> defines a row, which contains <th/> elements for header rows and <td/> elements for data rows), and the 'colspan' and 'rowspan' attributes are also available if you need them. Table presentation (such as cellpadding and cellspacing) is handled by the XSLT and CSS stylesheets.</p>
|
|
<p>In fact, the xep.xsl file performs all sorts of magic in converting your XML file into HTML, including creation of the front matter, table of contents, section numbering, notes, and revision history. Feel free to submit patches for this file, but do not commit your modified version to source control.</p>
|
|
</section2>
|
|
</section1>
|
|
<section1 topic='The Sections of a XEP Document' anchor='sections'>
|
|
<p>Most XEP specifications will have most of the following sections, usually in something like the order shown. Other sections may be appropriate (e.g., &xep0071; has a section for W3C Considerations). Use your best judgment regarding the sections you need in order to make your argument, or consult with the XMPP Extensions Editor regarding your needs.</p>
|
|
<section2 topic='Introduction' anchor='sections-intro'>
|
|
<p>The introduction to a XEP document is quite important since it provides the rationale for considering the proposal. In particular, the introduction SHOULD include information such as the following:</p>
|
|
<ol>
|
|
<li>Tasks that users currently cannot complete because we are lacking the protocol you propose. (Note: Users are not just IM users, but any person, system, or application that could gain value from interacting with other entities over Jabber/XMPP networks.)</li>
|
|
<li>Other projects or protocols and how Jabber/XMPP technologies could interface with them because of your proposed protocol (e.g., XML-RPC, SOAP).</li>
|
|
<li>A comparison between Jabber/XMPP technologies and "the competition" (e.g., other IM systems or messaging protocols) that describes holes in the Jabber/XMPP protocols that need to be filled in order to offer similar functionality.</li>
|
|
<li>The relevant history of thinking within the Jabber/XMPP community.</li>
|
|
<li>Real-world examples of problems the protocol can solve.</li>
|
|
</ol>
|
|
</section2>
|
|
<section2 topic='Requirements' anchor='sections-reqs'>
|
|
<p>Every XEP document SHOULD include a section describing the requirements being addressed by the document. This information is critically important, because it clearly defines the scope of the proposal as well as any relevant constraints on the protocol design.</p>
|
|
</section2>
|
|
<section2 topic='Glossary' anchor='sections-glossary'>
|
|
<p>If your XEP document uses terms that may not be familiar to the reader, please define them in a glossary.</p>
|
|
</section2>
|
|
<section2 topic='Use Cases' anchor='sections-usecases'>
|
|
<p>It is recommended that document authors structure their proposals according to the use cases that the proposal will address. <note>A good introduction to use cases may be found at <<link url="http://www.pols.co.uk/usecasezone/">http://www.pols.co.uk/usecasezone/</link>>.</note> We have found that use cases force authors to focus on functionality rather than "protocol for the sake of protocol". It is also helpful to sort use cases by actor, as is done in &xep0045;, for example. Include one subsection for each use case.</p>
|
|
<p>When writing use cases and the associated protocols, make sure to:</p>
|
|
<ul>
|
|
<li>Clearly define the success scenarios, alternate flows, and possible errors.</li>
|
|
<li>Describe the expected behavior of Jabber/XMPP clients, servers, and components when using this protocol.</li>
|
|
<li>Include lots of protocol examples. <note>Our mantra is: "We put the example in example.com!"</note></li>
|
|
</ul>
|
|
<p>We just said so, but we will repeat ourselves: include lots of protocol examples. Examples help not only implementors but also those who will review your proposal in the Standards SIG and XMPP Council. You get extra credit with the XMPP Extensions Editor if you follow Jabber tradition by using characters and situations from the plays of Shakespeare:</p>
|
|
<example caption='An Example from Shakespeare'><![CDATA[
|
|
<message
|
|
from='juliet@capulet.com/balcony'
|
|
to='romeo@montague.net/garden'
|
|
type='chat'>
|
|
<body>Wherefore art thou, Romeo?</body>
|
|
</message>
|
|
]]></example>
|
|
</section2>
|
|
<section2 topic='Error Codes' anchor='sections-errors'>
|
|
<p>If your proposal defines a number of error and status codes (as is done in XEP-0045), it is a good idea to include a table of all the codes defined in your document.</p>
|
|
</section2>
|
|
<section2 topic='Business Rules' anchor='sections-bizrules'>
|
|
<p>You may want to include a section describing various business rules (essentially, a variety of MUSTs, SHOULDs, and MAYs regarding application behavior). This is not required but can be helpful to implementors.</p>
|
|
</section2>
|
|
<section2 topic='Implementation Notes' anchor='sections-impl'>
|
|
<p>You may want to include a section devoted to implementation notes. Again, this is not required but can be helpful to implementors.</p>
|
|
</section2>
|
|
<section2 topic='Internationalization Considerations' anchor='sections-i18n'>
|
|
<p>If there are any internationalization or localization issues related to your proposal (e.g., whether to include the 'xml:lang' attribute), define them in this optional section.</p>
|
|
</section2>
|
|
<section2 topic='Security Considerations' anchor='sections-security'>
|
|
<p>Your proposal MUST include a section entitled "Security Considerations". Even if there are no security features or concerns related to your proposal, you MUST note that fact. For helpful guidelines, refer to &rfc3552;.</p>
|
|
</section2>
|
|
<section2 topic='IANA Considerations' anchor='sections-iana'>
|
|
<p>This section is REQUIRED. The IANA is the Internet Assigned Numbers Authority, the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. Most proposals do not require interaction with the IANA, in which case the text of this section SHOULD read "This document requires no interaction with the Internet Assigned Numbers Authority (IANA)." If your proposal requires interaction with the IANA, discuss the matter with the XMPP Extensions Editor. Do not contact the IANA on your own!</p>
|
|
</section2>
|
|
<section2 topic='XMPP Registrar Considerations' anchor='sections-registrar'>
|
|
<p>This section is REQUIRED. The XMPP Registrar maintains a list of reserved Jabber/XMPP protocol namespaces as well as registries of parameters used in the context of protocols approved by the XMPP Standards Foundation. If your proposal does not require interaction with the XMPP Registrar, the text of this section SHOULD read "No namespaces or parameters need to be registered with the XMPP Registrar as a result of this document." Refer to Draft or Final XEPs for appropriate text in other cases, or consult with the XMPP Extensions Editor.</p>
|
|
</section2>
|
|
<section2 topic='XML Schema' anchor='sections-schema'>
|
|
<p>An XML Schema is required in order for protocols to be approved by the XMPP Council. The XMPP Extensions Editor can assist you in defining an XML Schema for the protocol you are proposing.</p>
|
|
</section2>
|
|
<section2 topic='Acknowledgements' anchor='sections-ack'>
|
|
<p>Some XEP documents end with a section thanking non-authors who have made significant contributions to the specification; if that is true of your document, feel free to include this section.</p>
|
|
</section2>
|
|
</section1>
|
|
<section1 topic='XEP Styleguide' anchor='styleguide'>
|
|
<p><em>Note: Authors of XMPP Extension Protocol specifications can consider this section as a kind of "Implementation Notes". :-)</em></p>
|
|
<p>XMPP Extension Protocols are written in English. It is not expected that you will be a fine prose writer, but try to write in a clear, easily-understood fashion. The XMPP Extensions Editor will correct any errors of grammar, spelling <note>With all due respect to authors in other parts of the world, XMPP Extension Protocols follow American spelling conventions; thus "authorisation" will be changed to "authorization" and such.</note>, punctuation, and usage he may find in your proposal, but may not do so until your proposal is in the XMPP Council's queue for advancement to Draft or Active. In addition, the XMPP Extensions Editor reserves the right to improve phrases that are unclear or infelicitous, move sections around, modify examples to use Shakespearean characters, and otherwise improve the argument and logical flow of your proposal (naturally, without changing the meaning).</p>
|
|
<p>The following styleguide is provided to supplement the standard English styleguides, such as <cite>The Elements of Style</cite> <note>See <<link url='http://en.wikipedia.org/wiki/The_Elements_of_Style'>http://en.wikipedia.org/wiki/The_Elements_of_Style</link>>.</note> and <cite>The Chicago Manual of Style</cite> <note>See <<link url='http://en.wikipedia.org/wiki/The_Chicago_Manual_of_Style'>http://en.wikipedia.org/wiki/The_Chicago_Manual_of_Style</link>>.</note>; please refer to those resources for information about common English (especially American English) usage and to this styleguide for XEP-specific guidelines.</p>
|
|
<section2 topic='Attributes' anchor='style-attr'>
|
|
<p>When talking about an attribute by name, refer to it in single quotes. Example: the 'to' attribute.</p>
|
|
<p>When talking about the value of an attribute, refer to it in double quotes. Example: the value of the 'subscription' attribute is "both".</p>
|
|
<p>Elements <em>possess</em> attributes and <em>contain</em> character data and/or child elements; do not confuse these terms.</p>
|
|
</section2>
|
|
<section2 topic='Code Examples' anchor='style-ex'>
|
|
<p>In examples, use single quotes rather than double quotes; they are more readable.</p>
|
|
<p>To show the hierarchy of XML elements, indent two spaces for every level.</p>
|
|
<p>If an element possesses multiple attributes, please show them in the order dictated by &w3canon;.</p>
|
|
<p>If an element possesses a large number of attributes, include a line break before each attribute and indent them so that they are vertically aligned for readability.</p>
|
|
<p>If the XML character data of an element is long, include line breaks and indent by two spaces.</p>
|
|
<p>Examples are the major source of right-scrolling in our HTML output files. Right-scrolling is evil. Therefore, adjust your example layouts accordingly (line widths should be no more than 110 characters or so).</p>
|
|
<p>Example:</p>
|
|
<code><![CDATA[
|
|
<iq from='darkcave@macbeth.shakespeare.lit'
|
|
id='config1'
|
|
to='crone1@shakespeare.lit/desktop'
|
|
type='result'>
|
|
<query xmlns='http://jabber.org/protocol/muc#roomconfig'>
|
|
<x xmlns='jabber:x:data' type='form'>
|
|
<title>Configuration for "darkcave" Room</title>
|
|
<instructions>
|
|
Please complete this form to make changes to the configuration
|
|
of your room; to add room owners and administrators, use the
|
|
appropriate room commands rather than this form.
|
|
</instructions>
|
|
<field type='hidden' var='FORM_TYPE'>
|
|
<value>http://jabber.org/protocol/muc#roomconfig</value>
|
|
</field>
|
|
</query>
|
|
</iq>
|
|
]]></code>
|
|
<p>Some examples (e.g., SASL examples) include strings that are encoded using Base64 (see &rfc3548;). An easy way to generate these is to use the <link url='http://www.openssl.org/'>OpenSSL</link> "enc" command to generate the base64-encoded equivalent. For example, the following command will generate the base64-encoded string "YmFyZEBzaGFrZXNwZWFyZS5saXQ=":</p>
|
|
<code>
|
|
echo -n 'bard@shakespeare.lit' | openssl enc -base64
|
|
</code>
|
|
<p>Some examples (e.g., avatar examples) include strings that are SHA-1 hashes (see &rfc3174;). An easy way to generate these is to use the <link url='http://www.openssl.org/'>OpenSSL</link> "dgst" command to generate the SHA-1 hash. For example, the following command will generate the SHA-1 hash "9f5f9fdab9da7fc12e3c52b258acbcb4bb8e66ac":</p>
|
|
<code>
|
|
echo -n 'bard@shakespeare.lit' | openssl dgst -sha1
|
|
</code>
|
|
</section2>
|
|
<section2 topic='Conformance Terms' anchor='style-conf'>
|
|
<p>Conformance terms (e.g,, "MUST" and "SHOULD") are specified in RFC 2119. Use them. When such terms are not in ALL CAPS, the special conformance sense does not apply. <note>This point should be obvious but may be confusing to some XEP authors, so we must mention it explicitly. ;-)</note></p>
|
|
</section2>
|
|
<section2 topic='Elements' anchor='style-elem'>
|
|
<p>When talking about an element by name, refer to it as an empty XML element. Example: the <query/> element.</p>
|
|
<p>The top-level &MESSAGE;, &PRESENCE;, and &IQ; elements are actually XML stanzas (see <cite>RFC 3920</cite>); please refer to them as stanzas, not elements.</p>
|
|
<p>Elements <em>possess</em> attributes and <em>contain</em> character data and/or child elements; do not confuse these terms.</p>
|
|
<p>Do not use the term "tag" when you mean "element".</p>
|
|
<p>Do not add a possessive to the element itself. Negative example: the <body/>'s character data. Positive example: the <body/> element's character data.</p>
|
|
<p>Note: There are shortcuts for stanza names and some common element names in the xep.ent file.</p>
|
|
</section2>
|
|
<section2 topic='Errors' anchor='style-err'>
|
|
<p>When talking about an error condition, use the XML element names defined in <cite>RFC 3920</cite> rather than the old HTTP-style code numbers. Example: the <feature-not-implemented/> error.</p>
|
|
<p>Note: There are shortcuts for the stanza errors in the xep.ent file.</p>
|
|
</section2>
|
|
<section2 topic='Namespaces' anchor='style-ns'>
|
|
<p>When talking about a namespace by name, refer to it in single quotes. Example: the 'jabber:iq:roster' namespace.</p>
|
|
<p>An element or attribute is <em>qualified by</em> (rather than "scoped by" or "in") a particular namespace.</p>
|
|
</section2>
|
|
<section2 topic='Quotes' anchor='style-quot'>
|
|
<p>For precision, the XSF follows IETF usage by placing all punctuation outside the quotation marks unless one is quoting text that includes the punctuation. Example: the port used for client communications is "5222".</p>
|
|
</section2>
|
|
</section1>
|
|
</xep>
|