Subject: [xmpp] 6122bis examples

From: Peter Saint-Andre <[email-masked]>
Date: Mon, 04 Nov 2013 16:22:36 -0800

In the past, I have promised to add some examples to 6122bis. However, I
have also neglected to do so. Here is some proposed text. If folks would
like more examples, I'd be happy to add them.

###

3.5.  Examples

   The following examples illustrate a small number of JIDs that are
   consistent with the format defined above.

   Table 1: A sample of legal JIDs

   +---------------------------------+---------------------------------+
   | # | JID                         | Notes                           |
   +---------------------------------+---------------------------------+
   | 1 | [email-masked]          | A "bare JID"                    |
   +---------------------------------+---------------------------------+
   | 2 | [email-masked]/foo      | A "full JID"                    |
   +---------------------------------+---------------------------------+
   | 3 | [email-masked]/foo bar  | Single space in resourcepart    |
   +---------------------------------+---------------------------------+
   | 4 | [email-masked]        | Another bare JID                |
   +---------------------------------+---------------------------------+
   | 5 | fu&#xDF;[email-masked]    | The third character is LATIN    |
   |   |                             | SMALL LETTER SHARP S (U+00DF)   |
   +---------------------------------+---------------------------------+
   | 6 | &#x3C0;@example.com         | A localpart of GREEK SMALL      |
   |   |                             | LETTER PI (U+03C0)              |
   +---------------------------------+---------------------------------+
   | 7 | &#x3C0;@example.com/&#x3A3; | A resourcepart of GREEK CAPITAL |
   |   |                             | LETTER SIGMA (U+03A3)           |
   +---------------------------------+---------------------------------+
   | 8 | &#x3C0;@example.com/&#x3C3; | A resourcepart of GREEK SMALL   |
   |   |                             | LETTER SIGMA (U+03C3)           |
   +---------------------------------+---------------------------------+
   | 9 | &#x3C0;@example.com/&#x3C2; | A resourcepart of GREEK SMALL   |
   |   |                             | LETTER FINAL SIGMA (U+03C2)     |
   +---------------------------------+---------------------------------+
   | 10| [email-masked]/&#x265A;| A resourcepart of the Unicode   |
   |   |                             | character BLACK CHESS KING      |
   |   |                             | (U+265A)                        |
   +---------------------------------+---------------------------------+

   Several points might be worth noting here.  Regarding examples 4 and
   5: although in German the character esszett (LATIN SMALL LETTER SHARP
   S, U+00DF) can mostly be used interchangeably with the two characters
   "ss", the localparts in these examples are different and (if desired)
   a server would need to enforce a registration policy that disallows
   one of them if the other is registered.  Regarding examples 7, 8, and
   9: case-mapping of GREEK CAPITAL LETTER SIGMA (U+03A3) to lowercase
   (i.e., to GREEK SMALL LETTER SIGMA, U+03C3) during comparison would
   result in matching the JIDs in examples 7 and 8; PRECIS mapping rules
   do not account for the special status of GREEK SMALL LETTER FINAL
   SIGMA (U+03C2), so the JIDs in examples 8 and 9 would not be matched.
   Regarding example 10: symbol characters such as BLACK CHESS KING
   (U+265A) are allowed by the PRECIS FreeformClass.

   The following examples illustrate strings that are not JIDs because
   they violate the format defined above.

   Table 2: A sample of strings that violate the JID rules

   +---------------------------------+---------------------------------+
   | # | Non-JID string              | Notes                           |
   +---------------------------------+---------------------------------+
   | 1 | "juliet"@example.com        | Quotation marks (U+0022) are    |
   |   |                             | not allowed in the localpart    |
   +---------------------------------+---------------------------------+
   | 2 | foo [email-masked]         | Spaces are not allowed in the   |
   |   |                             | localpart                       |
   +---------------------------------+---------------------------------+
   | 3 | [email-masked]         | Symbol characters (e.g., U+265A)|
   |   |                             | are not allowed in the localpart|
   +---------------------------------+---------------------------------+
   | 4 | [email-masked]/ foo     | Leading spaces are not allowed  |
   |   |                             | in the resourcepart             |
   +---------------------------------+---------------------------------+
   | 5 | [email-masked]/foo  bar | Double spaces are not allowed   |
   |   |                             | in the resourcepart             |
   +---------------------------------+---------------------------------+

###