%ents;
]>
Defined provisional mapping from vcard-temp to vCard4. Updated to track base vCard4 specs; defined IQ transport, with pubsub for notifications; added examples for server vCards; described several problematic aspects of mapping from vcard-temp. Updated to track base vCard4 specs; defined IQ transport, with pubsub for notifications; added examples for server vCards; specified mapping from vcard-temp. Initial published version. Corrected more errors in the examples. Corrected some errors in the examples. Third draft. Second draft. First draft. Since 1999, the Jabber/XMPP community has used an interim, unofficial XML representation of vCard data for personal contacts, called &xep0054;. Recently, the IETF has upgraded vCard from vCard3 to &vcardrev;, and at the same time has defined &vcardxml; as an official XML format for vCard4. This document specifies an XMPP extension for use of the vCard4 XML format in XMPP systems, with the intent of obsoleting the vcard-temp format. Primarily this document defines the encapsulation method itself; secondarily it also defines transport methods and a mapping to the vcard-temp format for migration by clients and servers. This specification was designed with the following requirements in mind. Because there is now an XML namespace for the official vCard format, we can simply re-use that namespace: "urn:ietf:params:xml:ns:vcard-4.0". The vCard XML format defined at the IETF specifies that the root element is <vcards/>, where the only defined child element is <vcard/>. For use in XMPP, we specify that the root element shall be <vcard/>, not <vcards/>. As in XEP-0054, the primary method for publishing and retrieving vCards is the XMPP &IQ; stanza. An XMPP entity retrieves the vCard of another entity (or itself) by sending an IQ-get to the target entity containing a <vcard/> child element (note the lowercase "c"!) qualified by the 'urn:ietf:params:xml:ns:vcard-4.0' namespace. If a vCard exists for the target entity, the responsible entity (e.g., the XMPP server that hosts the account for a bare JID) MUST return the data in an IQ-result: If no vCard exists, the server MUST return an IQ-result containing an empty <vcard/> element. An XMPP entity publishes or updates its vCard by sending an IQ-set to itself, containing a <vcard/> child element qualified by the 'urn:ietf:params:xml:ns:vcard-4.0' namespace. If no error occurs, the responsible entity returns an IQ-result. Note: An entity MAY have authorization to update the vCard of another entity (e.g., a server administrator might have authorization to modify the server's vCard). &xep0060; provides a way to subscribe to events, and &xep0163; defines a pubsub profile for events associated with instant messaging (IM) accounts. If PEP is supported by an IM server, it can be used to automatically generate event notifications when a user's vCard is modified. The canonical location for notifications regarding a user's vCard is a pubsub node whose name is "urn:xmpp:vcard4". Let us imagine that Juliet wishes to receive the updates that Romeo publishes to his vCard. She has two options:
80202
80210
Because Juliet has sent presence to Romeo including Entity Capabilities data that includes the "urn:xmpp:vcard4+notify" feature, Romeo's XMPP server will send a PEP notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with XMPP clients that are not pubsub-capable (see Message Body). This is in accordance with XEP-0060, second 6.1.7.
Note: There is no payload, because this is a pure notification (the receiver needs to retrieve the vCard using an IQ-get as described earlier..
Traditionally, vCards have been used on the XMPP network for entities other than human users, e.g. by XMPP servers and chatrooms. When such automated entities use vCards, it is RECOMMENDED to specify a value of "thing" for the vCard4 KIND property &vcardthing;. An example follows.
The vCard information published to one's XMPP server is world-readable; therefore, users should exercise due caution when determining what information to include (e.g., street addresses, personal telephone numbers, or email addresses).
This document does not require interaction with &IANA;.
This section provides a more detailed description of mapping vcard-temp properties to vcard4 properties.
The vcard-temp specification defined a <DESC/> element. This element was not part of the vCard3 schema. Mapping the vcard-temp <DESC/> element to the vCard4 NOTE property is appropriate.
The vcard-temp specification defined a <JABBERID/> element:
Although the JABBERID field was not part of the vCard3 schema and was simply hacked into vcard-temp, &rfc4770; defined an IMPP property for instant messaging and presence addresses, which was ported to vCard4. In the vCard4 XML format, the IMPP property for a JabberID would be as follows.
Several of the properties in vcard-temp are defined differently in vCard3. In fact, the definitions even differ from those provisionally made in the so-called "Dawson drafts" from which vcard-temp was supposedly defined (for reference, the last of these is archived at <http://www.watersprings.org/pub/id/draft-dawson-vcard-xml-dtd-03.txt>). The reasons for these discrepancies are unknown. However, care must be taken in correctly mapping these properties from vcard-temp to vCard4.
The DTD in XEP-0054 provided this definition for the KEY element:
]]>
However, the DTD in the final Dawson draft provided the following definition:
]]>
The relevant RelaxNG definition in vCard4 XML is as follows:
The source of the spurious <TYPE/> and <CRED/> elements is unknown. Here we map the vcard-temp <CRED/> element to the vCard4 value-text construction.
The DTD in XEP-0054 provided this definition for the SOUND element:
]]>
However, the DTD in the final Dawson draft provided the following definition:
]]>
The source of the spurious <PHONETIC/> element is unknown. However, it does not exist in vCard4 and therefore is simply discarded when mapping.
The following properties are defined differently in vcard-temp and vCard4. As a result, the mappings are workable but might not preserve all information that could have been contained in vcard-temp data.
The following address type values allowed in vCard3 were removed from vCard4:
In vCard3 and vcard-temp, the AGENT property was allowed to contain inline vCard of someone who could act as an agent for the primary owner of the referenced vCard. In vCard4, inline vCards are disallowed. Therefore only pointers to external vCard objects are now allowed, by means of a URI.
The ORGUNIT property was removed from vCard4, with the result that the ORGNAME property becomes the only value for an ORG.
The SORT-STRING property from vCard3 was renamed to SORT-AS in vCard4.
The following telephony type values allowed in vCard3 were removed from vCard4:
In addition, in vCard4 the telephone number is represented as a tel: URI, not by means of a NUMBER property.
The following properties are defined similarly in vcard-temp, vCard3, and vCard4, and the mappings are fairly straightforward (a future version of this document might provide more detailed narrative descriptions of the mappings).
The following properties were defined in vCard3 but were removed from vCard4:
There is no mapping from these properties to vCard4.
This section provides a highly provisional and purely informational XSLT script for migration from vcard-temp to vCard4.
data: ;
xmpp:
geo: ,
data: ;
data:audio/basic;base64,
home
work
1
home
work
text
voice
fax
cell
video
pager
textphone
tel:
home
work
1
]]>
Thanks to Joe Hildebrand, Waqas Hussain, and Matt Miller for their feedback.