[Cache from http://www.jabber.org/jeps/jep-0054.html; please use this canonical URL/source if possible.]


JEP-0054: vcard-temp

Informational documentation of the vCard-XML format currently in use within the Jabber community.

Author Information

Peter Saint-Andre

Email: stpeter@jabber.org
JID: stpeter@jabber.org

JEP Information

Number: 0054
Status: Experimental
Type: Informational
JIG: Standards JIG
Dependencies: None

Legal Notice

This Jabber Enhancement Proposal is copyright 2001 - 2002 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy (http://jabber.org/jsf/ipr-policy.php). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/).

Revision History

Version 0.2 (2002-11-06)

Many small fixes; added implementation notes. (psa)

Version 0.1 (2002-10-31)

Initial version. (psa)


Table of Contents:
1. Introduction
2. History
3. Use Cases
3.1. Retrieving One's vCard
3.2. Updating One's vCard
3.3. Viewing Another User's vCard
4. Security Considerations
5. IANA Considerations
6. JANA Considerations
7. Implementation Notes
8. DTD


1. Introduction

This JEP documents the vCard-XML format currently in use within the Jabber community. A future JEP will recommend a standards-track protocol to supersede this informational document.

The basic functionality is for a user to store and retrieve an XML representation of his or her vCard using the data storage capabilities native to all existing Jabber server implementations. This is done by by sending an <iq/> of type "set" (storage) or "get" (retrieval) to one's Jabber server containing a <vCard/> child scoped by the 'vcard-temp' namespace, with the <vCard/> element containing the actual vCard-XML elements as defined by the vCard-XML DTD. Other users may then view one's vCard information.

2. History

vCards are an existing and widely-used standard for personal user information storage, somewhat like an electronic business card. The vCard format is defined in RFC 2426 [1].

In 1998, Frank Dawson submitted several Internet-Drafts proposing to represent the standard vCard format in XML. When the Jabber project was originally looking for a method to store personal user information, the only available XML representation of vCards was version 2 of Frank Dawson's Internet-Draft. He also submitted a third Internet-Draft on November 15, 1998. Unfortunately, neither proposal moved forward within the IETF. The Jabber project continued to use the version 2 proposal and DTD, and appeared to be the only users thereof. Because no similar DTD arose, the Jabber project continued to use the version 2 DTD, making two small modifications to adapt it for use within Jabber. This format was then implemented under the 'vcard-temp' namespace.

3. Use Cases

3.1 Retrieving One's vCard

A user may retrieve his or her own vCard by sending XML of the following form to his or her own JID:

Example 1. Requesting One's Own vCard

<iq 
    to='stpeter@jabber.org'
    from='stpeter@jabber.org/Gabber'
    type='get'
    id='v1'>
  <vCard xmlns='vcard-temp'/>
</iq>
    

The server should then return the vCard to the user:

Example 2. Receiving One's Own vCard

<iq 
    from='stpeter@jabber.org'
    to='stpeter@jabber.org/Gabber'
    type='result'
    id='v1'>
  <vCard xmlns='vcard-temp'>
    <FN>Peter Saint-Andre</FN>
    <N>
      <FAMILY>Saint-Andre<FAMILY>
      <GIVEN>Peter</GIVEN>
      <MIDDLE/>
    </N>
    <NICKNAME>stpeter</NICKNAME>
    <URL>http://www.jabber.org/people/stpeter.php</URL>
    <BDAY>1966-08-06</BDAY>
    <ORG>
      <ORGNAME>Jabber Software Foundation</ORGNAME>
      <ORGUNIT/>
    </ORG>
    <TITLE>Executive Director</TITLE>
    <ROLE>Patron Saint</ROLE>
    <TEL><VOICE/><WORK/><NUMBER>303-308-3282</NUMBER></TEL>
    <TEL><FAX/><WORK/><NUMBER/></TEL>
    <TEL><MSG/><WORK/><NUMBER/></TEL>
    <ADR>
      <WORK/>
      <EXTADD>Suite 600</EXTADD>
      <STREET>1899 Wynkoop Street</STREET>
      <LOCALITY>Denver</LOCALITY>
      <REGION>CO</REGION>
      <PCODE>80202</PCODE>
      <CTRY>USA</CTRY>
    </ADR>
    <TEL><VOICE/><HOME/><NUMBER>303-555-1212</NUMBER></TEL>
    <TEL><FAX/><HOME/><NUMBER/></TEL>
    <TEL><MSG/><HOME/><NUMBER/></TEL>
    <ADR>
      <HOME/>
      <EXTADD/>
      <STREET/>
      <LOCALITY>Denver</LOCALITY>
      <REGION>CO</REGION>
      <PCODE>80209</PCODE>
      <CTRY>USA</CTRY>
    </ADR>
    <EMAIL><INTERNET/><PREF/><USERID>stpeter@jabber.org</USERID></EMAIL>
    <JABBERID>stpeter@jabber.org</JABBERID>
    <DESC>
      More information about me is located on my 
      personal website: http://www.saint-andre.com/
    </DESC>
  </vCard>
</iq>
    

3.2 Updating One's vCard

A user may update his or her vCard by sending an IQ of type "set" to the server, following the format in the previous use case.

If a user attempts to perform an IQ set on another user's vCard, the server must return a 403 "Forbidden" error.

3.3 Viewing Another User's vCard

A user may view another user's vCard by sending an IQ of type "get" to the other user's bare JID. A compliant server must return the vCard to the requestor and not forward the IQ to the requestee's connected resource.

Example 3. Requesting Another User's vCard

<iq 
    to='jer@jabber.org'
    type='get'
    id='v3'>
  <vCard xmlns='vcard-temp'/>
</iq>
    

The server should then return the other user's vCard to the requestor:

Example 4. Receiving Another User's vCard

<iq 
    from='jer@jabber.org' 
    to='stpeter@jabber.org/home' 
    type='result'
    id='v3'>
  <vCard xmlns='vcard-temp'>
    <FN>JeremieMiller</FN>
    <N>
      <GIVEN>Jeremie</GIVEN>
      <FAMILY>Miller</FAMILY>
      <MIDDLE/>
    </N>
    <NICKNAME>jer</NICKNAME>
    <EMAIL><INTERNET/><PREF/><USERID>jeremie@jabber.org</USERID></EMAIL>
    <JABBERID>jer@jabber.org</JABBERID>
  </vCard>
</iq>
    

4. Security Considerations

There are no security features or concerns related to this proposal.

5. IANA Considerations

This JEP requires no interaction with the IANA.

6. JANA Considerations

The Jabber Assigned Names Authority (JANA) shall register the 'vcard-temp' namespace as an official feature category.

7. Implementation Notes

Note the following:

8. DTD

The following DTD is a slightly modified version of that contained in the second vCard-XML Internet-Draft authored by Frank Dawson. The only modifications were to add the JABBERID and DESC elements.

<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright (C) The Internet Society (2000). All Rights Reserved.

This document and translations of it may be copied and
furnished to others, and derivative works that comment
on or otherwise explain it or assist in its implmentation 
may be prepared, copied, published and distributed, in whole
or in part, without restriction of any kind, provided that
the above copyright notice and this paragraph are included
on all such copies and derivative works.

However, this document itself may not be modified in any
way, such as by removing the copyright notice or references
to the Internet Society or other Internet organizations,
except as needed for the purpose of developing Internet
standards in which case the procedures for copyrights
defined in the Internet Standards process MUST be followed,
or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will
not be revoked by the Internet Society or its successors or
assigns.

This document and the information contained herein is provided
on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE
USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR
ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

<!-- ==== -->

<!-- NOTE: the following root element is not used in the
           modified vcard-temp DTD published by the Jabber 
           project (now Jabber Software Foundation) and is
           included here only for historical purposes; 
           implementations that comply with vcard-temp must
           specify the root element as vCard, not xCard. -->

<!-- Root element and container for one
  or more vCard objects -->
<!ELEMENT xCard (vCard)+>

<!-- Individual vCard container -->
<!ELEMENT vCard (
  (VERSION, FN, N),
  (NICKNAME?,
  PHOTO?, 
  BDAY?, 
  ADR?, 
  LABEL?, 
  TEL?, 
  EMAIL?,
  JABBERID?,
  MAILER?, 
  TZ?, 
  GEO?, 
  TITLE?, 
  ROLE?,  
  LOGO?, 
  AGENT?, 
  ORG?, 
  CATEGORIES?, 
  NOTE?, 
  PRODID?, 
  REV?, 
  SORT-STRING?, 
  SOUND?, 
  UID?, 
  URL?, 
  CLASS?, 
  KEY?,
  DESC?
)*)>

  <!-- vCard specification version property. 
    This MUST be 2.0, if the document conforms to RFC 2426. -->
  <!ELEMENT VERSION (#PCDATA)>

  <!-- Formatted or display name property. -->
  <!ELEMENT FN (#PCDATA)>

  <!-- Structured name property. Name components with multiple
    values must be specified as a comma separated
	list of values. -->
  <!ELEMENT N ( FAMILY?, GIVEN?, MIDDLE?, PREFIX?, SUFFIX?)>
  
    <!ELEMENT FAMILY (#PCDATA)>
    <!ELEMENT GIVEN (#PCDATA)>
    <!ELEMENT MIDDLE (#PCDATA)>
    <!ELEMENT PREFIX (#PCDATA)>
    <!ELEMENT SUFFIX (#PCDATA)>

  <!-- Nickname property. Multiple nicknames must be
    specified as a comma separated list value. -->
  <!ELEMENT NICKNAME (#PCDATA)>

  <!-- Photograph property. Value is either a BASE64 encoded
    binary value or a URI to the external content. -->
  <!ELEMENT PHOTO ((TYPE, BINVAL) | EXTVAL)>

  <!-- Birthday property. Value must be an ISO 8601 formatted
    date or date/time value. -->
  <!ELEMENT BDAY (#PCDATA)>

  <!-- Structured address property. Address components with
    multiple values must be specified as a comma separated list
    of values. -->
  <!ELEMENT ADR (
    HOME?, 
    WORK?, 
    POSTAL?, 
    PARCEL?, 
    (DOM | INTL)?, 
    PREF?, 
    POBOX?, 
    EXTADR?, 
    STREET?, 
    LOCALITY?, 
    REGION?, 
    PCODE?, 
    CTRY?
  )>
  
    <!ELEMENT POBOX (#PCDATA)>
    <!ELEMENT EXTADR (#PCDATA)>
    <!ELEMENT STREET (#PCDATA)>
    <!ELEMENT LOCALITY (#PCDATA)>
    <!ELEMENT REGION (#PCDATA)>
    <!ELEMENT PCODE (#PCDATA)>
    <!ELEMENT CTRY (#PCDATA)>

  <!-- Address label property. -->
  <!ELEMENT LABEL (
    HOME?, 
    WORK?, 
    POSTAL?, 
    PARCEL?, 
    (DOM | INTL)?, 
    PREF?, 
    LINE+
  )>

    <!-- Individual label lines. -->
    <!ELEMENT LINE (#PCDATA)>

  <!-- Telephone number property. -->
  <!ELEMENT TEL (
    HOME?, 
    WORK?, 
    VOICE?, 
    FAX?, 
    PAGER?, 
    MSG?, 
    CELL?, 
    VIDEO?, 
    BBS?, 
    MODEM?, 
    ISDN?, 
    PCS?, 
    PREF?, 
    NUMBER
  )>

    <!-- Phone number value. -->
    <!ELEMENT NUMBER (#PCDATA)>

  <!-- Email address property. Default type is INTERNET. -->
  <!ELEMENT EMAIL (
    HOME?, 
    WORK?, 
    INTERNET?, 
    X400?, 
    USERID
  )>

    <!ELEMENT USERID (#PCDATA)>
  
  <!-- NOTE: the following element was added by the Jabber
             project (now Jabber Software Foundation) to
             handle Jabber IDs; the value must be in the
             form of user@host -->

  <!ELEMENT JABBERID (#PCDATA)>
  
  <!-- Mailer (e.g., Mail User Agent Type) property. -->
  <!ELEMENT MAILER (#PCDATA)>
  
  <!-- Time zone's Standard Time UTC offset. Value must be an
    ISO 8601 formatted UTC offset. -->
  <!ELEMENT TZ (#PCDATA)>
  
  <!-- Geographical position. Values are the decimal degress of
    LATitude and LONgitude. The value should be specified to 
    six decimal places.-->
  <!ELEMENT GEO (LAT, LON)>
  
    <!-- Latitude value. -->
    <!ELEMENT LAT (#PCDATA)>
	
    <!-- Longitude value. -->
    <!ELEMENT LON (#PCDATA)>
	
  <!-- Title property. -->
  <!ELEMENT TITLE (#PCDATA)>

  <!-- Role property. -->
  <!ELEMENT ROLE (#PCDATA)>
  
  <!-- Organization logo property. -->
  <!ELEMENT LOGO ((TYPE, BINVAL) | EXTVAL)>
  
  <!-- Administrative agent property. -->
  <!ELEMENT AGENT (vCard | EXTVAL)>
  
  <!-- Organizational name and units property. -->
  <!ELEMENT ORG (ORGNAME, ORGUNIT*)>
  
    <!ELEMENT ORGNAME (#PCDATA)>
  
    <!ELEMENT ORGUNIT (#PCDATA)>
  
  <!-- Application specific categories property. -->
  <!ELEMENT CATEGORIES (KEYWORD+)>
  
    <!ELEMENT KEYWORD (#PCDATA)>
  
  <!-- Commentary note property. -->
  <!ELEMENT NOTE (#PCDATA)>
  
  <!-- Identifier of product that generated the vCard property. -->
  <!ELEMENT PRODID (#PCDATA)>
  
  <!-- Last revised property. The value must be an 
       ISO 8601 formatted UTC date/time. -->
  <!ELEMENT REV (#PCDATA)>
  
  <!-- Sort string property. -->
  <!ELEMENT SORT-STRING (#PCDATA)>
  
  <!-- Formatted name pronunciation property. The value is 
       either a textual phonetic pronunciation, a BASE64 
       encoded binary digital audio pronunciation or a URI to
       an external binary digital audio pronunciation.-->	
  <!ELEMENT SOUND (PHONETIC | BINVAL | EXTVAL)>
  
    <!-- Textual phonetic pronunciation. -->
    <!ELEMENT PHONETIC (#PCDATA)>
   
  <!-- Unique identifier property. -->
  <!ELEMENT UID (#PCDATA)>
  
  <!-- Directory URL property. -->
  <!ELEMENT URL (#PCDATA)>

  <!-- NOTE: the following element was added by the Jabber
             project (now Jabber Software Foundation) to
             handle free-form descriptive text. -->

  <!ELEMENT DESC (#PCDATA)>
  
  <!-- Privacy classification property. -->
  <!ELEMENT CLASS (PUBLIC | PRIVATE | CONFIDENTIAL)>
  
    <!ELEMENT PUBLIC EMPTY>
	
    <!ELEMENT PRIVATE EMPTY>
	
    <!ELEMENT CONFIDENTIAL EMPTY>
	
  <!-- Authentication credential or encryption  key property. -->
  <!ELEMENT KEY (TYPE?, CRED)>
  
    <!ELEMENT CRED (#PCDATA)>

<!-- ==== -->

<!-- Common elements. -->

<!-- Addressing type indicators. -->
<!ELEMENT HOME EMPTY>
<!ELEMENT WORK EMPTY>
<!ELEMENT POSTAL EMPTY>
<!ELEMENT PARCEL EMPTY>
<!ELEMENT DOM EMPTY>
<!ELEMENT INTL EMPTY>
<!ELEMENT PREF EMPTY>
<!ELEMENT VOICE EMPTY>
<!ELEMENT FAX EMPTY>
<!ELEMENT PAGER EMPTY>
<!ELEMENT MSG EMPTY>
<!ELEMENT CELL EMPTY>
<!ELEMENT VIDEO EMPTY>
<!ELEMENT BBS EMPTY>
<!ELEMENT MODEM EMPTY>
<!ELEMENT ISDN EMPTY>
<!ELEMENT PCS EMPTY>
<!ELEMENT INTERNET EMPTY>
<!ELEMENT X400 EMPTY>

<!-- Format type parameter. -->
<!ELEMENT TYPE (#PCDATA)>

<!-- Base64 encoded binary value. -->
<!ELEMENT BINVAL (#PCDATA)>

<!-- URI to external binary value -->
<!ELEMENT EXTVAL (#PCDATA)>

<!-- ==== -->
  


Notes

1. http://www.ietf.org/rfc/rfc2426.txt